A taskqueue in cpp for multithread