Quantcast
Channel: Alternative to Thead.Sleep? in C# - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by GrayWizardx for Alternative to Thead.Sleep? in C#

Couple of suggestions:If your using explicit threads you can try setting ThreadType to "Background" to prevent it from blocking an exit.Try this as how you block:main thread:AutoResetEvent waitingEvent...

View Article



Answer by Andy West for Alternative to Thead.Sleep? in C#

Have a look at the blocking queue:http://msdn.microsoft.com/en-us/magazine/cc163427.aspx#S4

View Article

Answer by ACP for Alternative to Thead.Sleep? in C#

Use Monitor.Wait instead, and call Monitor.Pulse or Monitor.PulseAllto wake the thread up.

View Article

Answer by Anon. for Alternative to Thead.Sleep? in C#

The solution is "Don't sleep on your UI thread". You should have a thread waiting for user input (not polling), and if you have a thread which needs to sleep (which probably isn't the case - it sounds...

View Article

Alternative to Thead.Sleep? in C#

I have another thread polling user input. This thread is the main thread and can sleep minutes at a time. If the user hits wants to quit it may be 2+ minutes before the console window shuts down which...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>