multithreading - Questions on simple threading jargons -
Manual reset event is triggered, then all threads waiting on the event are scheduled. When an auto reset event is triggered, then only one scheduler is awaiting the waiting thread on the event.
There are really noob questions here to ask me, because I am new to threading.
- What does it mean to "set" and "reset" an event?
- What is the difference between manual-reset and auto reset events?
- When an event is "hint", what does it mean? Does this mean it is active?
- What does it mean when a thread becomes "Scheduler"?
- What is "waiting on the event"? Basically, a "waithandle" (which includes both manual reset events and auto reset events) are such that allow a thread. Wait until something is waiting - in this case, till WaitHandle "set".
One thread (thread A) can "wait" on a wait room, wait until it has a different thread (thread B) "set" (== "signal") Will allow you to continue.
The main difference occurs when you are waiting multiple threads on WaitHandle In this case, with manual reset event, all threads will be allowed to continue (i.e .: they are now timed, Which means that the OS will set them up and then to run them again at some point, usually quite quickly). With an auto reset event, a thread is allowed to continue, and WaitHandle is "reset", which prevents other threads from continuing (unless the next thread is "released" Until WaitHandle is prompted).
Comments
Post a Comment