Wait at this barrier and block until there are a count threads waiting

Property definitions

pthreads $ Barrier :: wait
	# Wait at this barrier and block until there are a `count` threads waiting
	fun wait
	do
		mutex.lock
		threads_waiting += 1
		if threads_waiting == count then
			threads_waiting = 0
			cond.broadcast
		else
			cond.wait(mutex.native.as(not null))
		end
		mutex.unlock
	end
lib/pthreads/pthreads.nit:459,2--471,4