EEK, spin for 2 seconds! You should never do that. First off, you should never spin on a
mono cpu box, second you should never spin for anything longer than the time taken by a
transition into the kernel and back.
Hmm... not sure what you mean here, you know the difference between a Sleep and a SpinWait
do you?
You should never call SpinWait for as long as 2 seconds whatever the context.
Sorry Willy - I had misread your post. But I dont recall saying you
should spinwait for 2 seconds? Instead of picking up on my mistakes
maybe you could use your time more productively to give an answer to
Alans initial question
For the benifit of anyone else -
Sleep - will relinquish control of the thread for the number of
milliseconds denoted by the parameter -technicaly it is removed from
consideration by the thread scheduler for that length of time
SpinWait - will effectively lock the current thread into a tight loop
for a specified number of itterations. Generally not recommended and is
only genuinely useful in a small number situations
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.