Zth (libzth)
|
Synchronization primitives example. This program will print something like this:
Other fiber fiber 3 outside of critical section { fiber 3 at start of critical section fiber 2 outside of critical section fiber 1 outside of critical section Other fiber } fiber 3 at end of critical section { fiber 2 at start of critical section Other fiber fiber 3 outside of critical section } fiber 2 at end of critical section { fiber 1 at start of critical section Other fiber fiber 2 outside of critical section } fiber 1 at end of critical section { fiber 3 at start of critical section Other fiber fiber 1 outside of critical section } fiber 3 at end of critical section { fiber 2 at start of critical section Other fiber fiber 3 outside of critical section } fiber 2 at end of critical section { fiber 1 at start of critical section Other fiber fiber 2 outside of critical section } fiber 1 at end of critical section { fiber 3 at start of critical section Other fiber fiber 1 outside of critical section } fiber 3 at end of critical section { fiber 2 at start of critical section Other fiber } fiber 2 at end of critical section { fiber 1 at start of critical section Other fiber } fiber 1 at end of critical section Other fiber