cpoll: threadpool: fix locking error; throw exception on thread creation failure