B
Bishman
Hi,
I have a form application that needs to query a DB at a set timed interval
and then refresh the form with values received from the DB. Simple enough.
My design releated questions are ....
Should I create a worker thread that encapsulates a timer, (which I believe
will also create a seperate thread when the timer fires) , or should I
create a timer that creates a new thread when it fires ? Or neither ?
Which sort of timer should I use. "System.Timers.Timer" or
"System.Windows.Forms.Timer"
I was going to 'place' the results of the DB query into a queue of some sort
that can then be retrieved at a set interval ( another timer ? ) and display
them on the form. How do I make this queue threadsafe ?
Some general design pointers would be appreciated.
Thanks.
Jon.
I have a form application that needs to query a DB at a set timed interval
and then refresh the form with values received from the DB. Simple enough.
My design releated questions are ....
Should I create a worker thread that encapsulates a timer, (which I believe
will also create a seperate thread when the timer fires) , or should I
create a timer that creates a new thread when it fires ? Or neither ?
Which sort of timer should I use. "System.Timers.Timer" or
"System.Windows.Forms.Timer"
I was going to 'place' the results of the DB query into a queue of some sort
that can then be retrieved at a set interval ( another timer ? ) and display
them on the form. How do I make this queue threadsafe ?
Some general design pointers would be appreciated.
Thanks.
Jon.