All pastes #330853 Raw Edit

Baptiste

public text v1 · immutable
#330853 ·published 2007-01-28 10:27 UTC
rendered paste body
	try:
		condition.acquire ( )
		if not counter == 0:
			while self.gothread:
				condition.wait ( )
		if self.gothread:
			lock.acquire ( )
		else:
			return
		
		try:
			operation()
                except:
                         tantpis()
	
	finally:
		condition.notify ( )
		condition.release ( )
		lock.release ( )