RosettaCodeData/Task/Metered-concurrency/PicoLisp/metered-concurrency.l
2023-07-01 13:44:08 -04: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) ) ) )