I suspect that our current code is not ready for multithreading, at least not offering what pthreads needs.