Skip to content

Provide a way to return from the event loop #900

@spennydl

Description

@spennydl

Currently we have #797 and #845 working on bringing in webassembly support. Unfortunately, in the browser we have to return from function calls. These backends both have to rely on throwing exceptions as control flow in order to break out of the loop.

Is there a way winit could provide some mechanisms for loops that work this way? I noticed some of the other backends implement a run_return function that is usually called by run; perhaps winit could standardize on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionDirection must be ironed outDS - webAffects the Web backend (WebAssembly/WASM)S - apiDesign and usability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions