Skip to content

Request: Web Workers Library #6260

@alexgleason

Description

@alexgleason

Is your feature request related to a problem? Please describe.

Web Workers are the main way to do parallel computing in Deno, but the API is very low-level. Libraries like Comlink exist, which I have been using in basically all my Deno projects, but I think an official solution from Deno would go a long way.

Describe the solution you'd like

I like @negrel's solution of first creating an RPC layer to handle the request-response pattern, and then building other stuff on top of that. If even just the RPC layer were added to std, it would be a good first step towards building a highly flexible system for dealing with web workers. It's still pretty low-level, but not so low-level that you need to build the RPC from scratch every time you want to use workers.

Describe alternatives you've considered

If left up to the community, I think people will just continue to complain forever that JavaScript is bad at parallelization. Which is true, but a lot can be done still to improve it.

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