WorkQueue.cc: Limit the lock granularity

Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>