Forms.Timer - multithreaded?

  • Thread starter Thread starter Jesper, Denmark
  • Start date Start date
J

Jesper, Denmark

Hi,

Does the System.Windows.Forms.Timer invoke the main form thread? Or does it
start another thread so that I need to lock my objects on which it operates
in case the user of the program saves data while the Timer updates data.

regards Jesper.
 
Peter said:
Works on the form's thread.

.... in contrast to System.Threading.Timer or System.Timers.Timer which both
raise their timing events on a worker thread. Getting the timing events in
the UI thread is the sole reason for the existence of
System.Windows.Forms.Timer.

-cd
 
Jesper,

First things first, you are violating the concept of timer by thinking to
execute that on a multi thread. thus it is not at all a practice to run the
timer on multi thread

Think once again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top