Details about condition variable and wait method
I wanna ask you a question.
What happens at low level when a thread call wait method on a condition variable?
My idea is that one:
There is a token-queue for each and every thread that know the condition variable.
in an insert in each and every queue of one token.
in an insert in one casual queue of one token.
If a thread call
IF in it's own queue there is a token, wait have no effect.
IF there isn't token in it's own queue,it do
SLEEP UNTIL NOTIFY
Thanks in advance..
Last edited on
Topic archived. No new replies allowed.