Skip to content

Support for asynchronous compilation #2

Description

@titzer

The initial design issue had several suggestions how we might support asynchronous compilation, including a number of suggestions. I think these ideas and alternatives can be summarized as:

  • 1: A separate instruction func.new_async that explicitly requests asynchronous compilation
    • 1A: it writes the result into a location (e.g. table index or global) when completed
    • 1B: it returns a kind of promise
    • 1C: it is integrated with stack-switching (e.g. it accepts a continuation)
  • 2: The implementation of func.new may return a function that blocks until host-compilation is ready
  • 3: There is a polling mechanism for asynchronous functions such as func.ready which queries whether a function is ready for use (i.e. won't block for host compilation)

Let's move further discussion/design of asynchrony to this issue.

@cfallin @kg @yuri91

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions