Build Queue with mutex and con-variable