Skip to content

Async.unsupervised — explicit fiber.join() semantics #305

Description

@rcardin

Parent

#302

What to build

Add tests to AsyncUnsupervisedSpec.scala (or extend AsyncSpec.scala) that verify fiber.join() and fiber.value behavior inside Async.unsupervised.

fiber.join() is the only way to observe a fiber's exception in an unsupervised scope. Its contract must hold: rethrows on failure, returns normally on success, returns silently on cancellation.

No implementation changes — tests only, building on top of the core scope introduced in #303.

Acceptance criteria

  • Test: fork a fiber that throws; call fiber.join() inside the block; assert the exception propagates to the caller of Async.unsupervised
  • Test: fork a fiber that returns a value; call fiber.join() then fiber.value (or use fiber.value directly); assert the correct value is returned
  • Test: fork a fiber, cancel it, call fiber.join(); assert no exception is raised (consistent with existing supervised Fiber.join() contract)
  • Tests follow the Async.run { Async.unsupervised { ... } } pattern established in AsyncSpec.scala

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agentyaes-coreYAES core effects

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions