Added blocking semaphores, but there is still
quite a bit of debugging to do.