Return immediatly if the task terminated, or block waiting for self to terminate

Property definitions

pthreads $ JoinTask :: join
	# Return immediatly if the task terminated, or block waiting for `self` to terminate
	fun join do
		mutex.lock
		if not is_done then
			var cond = new NativePthreadCond
			self.cond = cond
			cond.wait(mutex.native.as(not null))
		end
		mutex.unlock
	end
lib/pthreads/threadpool.nit:96,2--105,4