mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			213 B
		
	
	
	
		
			Mathematica
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			213 B
		
	
	
	
		
			Mathematica
		
	
	
	
	
	
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();
 | 
						|
};
 |