A
Andy
Hi,
I have some things that act in a typical producer consumer fashion.
When they have work to do, I want them doing that, but if there's no
work, I'm currently using Thread.Sleep to cause the thread to sleep so
its not continuously eating CPU time.
Is there another alternative to keep the thread from running? These
threads are used in a windows service, and when the service is stopped
it takes longer than I'd like it to because the thread sleeps for
about 15 seconds, then checks if it should be running.
Thanks
Andy
I have some things that act in a typical producer consumer fashion.
When they have work to do, I want them doing that, but if there's no
work, I'm currently using Thread.Sleep to cause the thread to sleep so
its not continuously eating CPU time.
Is there another alternative to keep the thread from running? These
threads are used in a windows service, and when the service is stopped
it takes longer than I'd like it to because the thread sleeps for
about 15 seconds, then checks if it should be running.
Thanks
Andy