shithub: purgatorio

ref: 15e065df12bf7ad79000d150cefa5038ee7416b3
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();
};