c# Programming Glossary: sleeping
ManualResetEvent vs. Thread.Sleep http://stackoverflow.com/questions/1116249/manualresetevent-vs-thread-sleep can wake up immediately when the event is signalled vs sleeping for a long time and recheck the condition every now and then... time. Also the time resolution is traditionally 10ms so sleeping less than 10ms usually just results in a 10ms sleep anyway...
When to use thread pool in C#? http://stackoverflow.com/questions/145304/when-to-use-thread-pool-in-c easily half the performance of your program say you have 3 sleeping threads and 2 active threads . Thus if those downloading threads..
C# Winform ProgressBar and BackgroundWorker http://stackoverflow.com/questions/1470927/c-sharp-winform-progressbar-and-backgroundworker share improve this question One problem is that you're sleeping for 30 seconds. Normally you'd call ReportProgress at various..
Why can't I declare C# methods virtual and static? http://stackoverflow.com/questions/248263/why-cant-i-declare-c-sharp-methods-virtual-and-static
Regex split string but keep separators http://stackoverflow.com/questions/2910536/regex-split-string-but-keep-separators
How frequent is DateTime.Now updated ? or is there a more precise API to get the current time? http://stackoverflow.com/questions/307582/how-frequent-is-datetime-now-updated-or-is-there-a-more-precise-api-to-get-the of DateTime.UtcNow on my machine. Here's a run with no sleeping at all a . is printed if UtcNow didn't change at all Finally..
Does lock() guarantee acquired in order requested? http://stackoverflow.com/questions/4228864/does-lock-guarantee-acquired-in-order-requested var time _dueTime DateTime.Now Console.WriteLine 0 2 sleeping for 1 ticks s.Index time.Ticks Thread.Sleep time Console.WriteLine.. ManualResetEvent false Prints Go entered 0 0 got lock 0 sleeping for 49979998 ticks Go entered 1 Go entered 2 Go entered 3 Go.. 7 Go entered 8 Go entered 9 0 exiting lock 1 got lock 1 sleeping for 5001 ticks 1 exiting lock 2 got lock 2 sleeping for 5001..
Multiple producers, single consumer http://stackoverflow.com/questions/5105382/multiple-producers-single-consumer there are no items in the queue it does a non busy wait no sleeping spinning until an item is available. share improve this answer..
Writing to a TextBox from another thread? http://stackoverflow.com/questions/519233/writing-to-a-textbox-from-another-thread on a seperate thread and doesn't block the UI while sleeping for int i 0 i 5 i AppendTextBox hi. Thead.Sleep 1000 c#.. on a seperate thread and doesn't block the UI while sleeping for int i 0 i 5 i AppendTextBox hi. Thead.Sleep 1000 share..
Why 3 threads for a basic single threaded c# console app? http://stackoverflow.com/questions/762316/why-3-threads-for-a-basic-single-threaded-c-sharp-console-app .NET application I believe you always get a thread mostly sleeping for the JIT Just in Time compiler as well as the GC Garbage..
SpinWait vs Sleep waiting. Which one to use? http://stackoverflow.com/questions/9719003/spinwait-vs-sleep-waiting-which-one-to-use specific Is there a way to Make BlockingCollection Pulse a sleeping thread when it reaches bounded capacity I rather avoid a busy..
|