Skip to content

Clarifications/confusion about task.return #453

@alexcrichton

Description

@alexcrichton

Looking at today's definition of task.return in CanonicalABI.md I'm left with a few questions I want to clarify:

  • For the type of the function generated it takes $opts into account, but that means that the intrinsic can be declared as both async and sync, is that intended? Is there a use case for calling this asynchronously?
  • For the runtime validation when the intrinsic is called it ensures that the $opts on task.return equals the options specified on the original canon lift, but is this what's intended when taking into account async/callbacks/etc? My (naive) expectation was that I could have an async/callback lifted export and be able to call this intrinsic synchronously, but as-written that means that the intrinsic would generate a trap I think?

cc @dicej

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions