shithub: purgatorio

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