Biping MENG wrote:
What about just pausing execution by yielding the thread's control to the
kernel using sched_yield()?

Yes. It forces the current thread to relinquish cpu. But it causes the
kernel to reschedule another thread to run (maybe of another process,
who knows), so we won't have the chance to pick another session for
this thread to run. Logically this won't the thread's blocking state.
Besides we only have limited number of threads in the pool. Once out
of our control, the thread has to wait until the kernel reschedule it.

Makes sense! :)

Thanks for the explanation!

Jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to