Mutex: Difference between revisions

Content added Content deleted
No edit summary
Line 577: Line 577:
We can simulate mutex
We can simulate mutex
<lang M2000 Interpreter>
<lang M2000 Interpreter>
Form 80, 60
Module CheckIt {
Module CheckIt {
Thread.Plan Concurrent
Thread.Plan Concurrent
Line 617: Line 618:
} as K
} as K
Read M$
Read M$
Thread K Execute Static N$=M$, C=0, Max=RANDOM(20)
Thread K Execute Static N$=M$, C=0, Max=RANDOM(1,8)
Thread K interval Random(300, 2000)
Thread K interval Random(300, 2000)
}
}
Line 634: Line 635:
}
}
CheckIt
CheckIt

</lang>
</lang>



=={{header|Nim}}==
=={{header|Nim}}==