Skip to content

Threads & non-async exports #651

@badeend

Description

@badeend

Two related questions:


The Returning section mentions:

Any of the threads contained by a task can call task.return; there is no "main thread" of a task.

Except that in the sync ABI, there is a "main thread"; the one that returns the return values, right?


The Blocking section mentions:

each of these potentially-blocking operations will trap if the current task's function type does not declare the async effect, since only async-typed functions are allowed to block.

Does this mean that threads spawned under a non-async task can never do blocking I/O? Seems like this restriction should only apply to the "main" thread of that task.

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