VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Community Snippets›Verse Language·Up to Community Snippets · Verse Language·61 of 114 in Verse Language

Event & Task Utilities

Event & Task Utilities

Async building blocks: a cooperatively cancellable spawned task and a one-shot await/signal latch.

Original, compile-verified Verse by Bizanator (Biloxi Studios). Clean-room sample you can drop into a UEFN project and adapt.

  • # Event & Task Utilities — Biloxi Studios Inc.
    #
    # Lightweight building blocks for async coordination: a cooperatively cancellable
    # task you can stop from the outside, and a tiny one-shot latch you can await and
    # signal across concurrent code. Dependency-free.
    #
    # Teaches: spawn/await, the <suspends> effect, classes implementing awaitable(t),
    # cooperative cancellation (tasks can't be force-killed — they check a flag), and
    # Verse's `event` type for cross-task signalling.
    #
    # Example — cancellable task:
    #   Task := SpawnCancellable(MyWork)   # MyWork(State)<suspends>:void
    #   Task.Cancel()                      # ask it to stop at its next check
    #
    # Example — one-shot latch:
    #   Latch := one_shot{}
    #   spawn{ Latch.Await(); DoSomethingOnce() }
    #   Latch.Signal()                     # releases the awaiter exactly once
    
    using { /Verse.org/Simulation }
    using { /Verse.org/Concurrency }

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Keep exploring
More in Verse Language · 61 of 114
Prev
daily reward roller
Next
math utils

Source

Epic Games documentation

Bizanator

MIT

View original
VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

🦜

Scout · your island guide

The Isle of Verse