Verse Library verse

05 Fragment

Groups operations to run in strict sequence without being interrupted by concurrent tasks.

verse-library/verse-concurrency-async-race-state-machines/05-fragment.verse

# Open the door AND play the chime AND wait 2s — all at once;
# continue only when the slowest finishes.
sync:
    OpenDoor()
    PlayChime()
    Sleep(2.0)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in