ManualResetEvent is slow?

T

Thomas

Hallo

Im using a ManualResetEvent to signal to my thread, when things are done.
But sometimes, I have measured that it can tak up to 90 ms, from the Set()
until the WaitOne() is trigged!!!

Way this delay? Anything else I can use to signal a thread faster?

Thomas
 
P

Paul G. Tobey [eMVP]

Well, you've told us little about the threading environment. Setting an
event doesn't mean that the thread should start immediately. It simply
means that the thread will be *ready to run*. When it runs is up to the
scheduler. If you have a higher-priority thread doing something at the same
time, your thread won't actually execute until that thread exits or blocks.

Paul T.
 

Ask a Question

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.

Ask a Question

Top