RosettaCodeData/Task/Metered-concurrency/PicoLisp/metered-concurrency.l
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

8 lines
260 B
Text

(let Sem (tmp "sem")
(for U 4 # Create 4 concurrent units
(unless (fork)
(ctl Sem
(prinl "Unit " U " aquired the semaphore")
(wait 2000)
(prinl "Unit " U " releasing the semaphore") )
(bye) ) ) )