shithub: purgatorio

ref: e2e50a8e5a74452672f9418bcdfe4de10f600ed0
dir: purgatorio/module/lock.m

View raw version
Lock: module
{
	PATH:	con "/dis/lib/lock.dis";

	Semaphore: adt {
		c: chan of int;
		obtain:	fn(nil: self ref Semaphore);
		release: fn(nil: self ref Semaphore);
		new: fn(): ref Semaphore;
	};
	
	init: fn();
};