|
-
May 10th, 2012, 12:22 PM
#6
Re: Different option for Thread.Sleep?
You have misunderstood the code.
The first Thread.Sleep() is simply to simulate some amount of work being done while the timer is executing.
The second Thread.Sleep (in ComputeBoundOp) is called on the timer's thread, not the main thread, because Thread.Sleep() always acts on the thread that called it.
Also, no; spawning a single thread would not be "really [in]efficient".
If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.
Yes; I have a blog too - http://the-angry-gorilla.com/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|