Type of semaphores
wait sem
blocks the calling thread on semaphore sem
if it was not
initialized with Some x
or not signalled before. The semaphore
is reset to None
, i.e. calling wait
again will block unless the
semaphore was signalled inbetween.