[sheepdog] quesiton about function worker_routine() in lib/work.c
nkuzbp at foxmail.com
Wed Sep 3 11:37:19 CEST 2014
I am reading sheepdog's source code. I have a question of the code in function worker_routine() in lib/work.c.
It calls sd_mutex_lock(&wi->startup_lock) in the beginning , and calls sd_mutex_unlock(&wi->startup_lock)
immediately after the lock. It seems that the code want to block the new threads until all the new threads are created.
I don't understand the purpose for doing this. Can anybody answer my question?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sheepdog