Mutex: Difference between revisions
m
→{{header|Oforth}}
(This is not written as a task.) |
|||
Line 641:
If the channel is empty, a task will wait until an object is available into the channel.
<lang Oforth>
: job(mut)
mut receive drop
"I get the mutex !"
"Now I release the mutex" println
1 mut send
▲func: mymutex
| mut |
Channel new dup send(1) drop ->mut
10 #[ #[
=={{header|Oz}}==
|