-
Notifications
You must be signed in to change notification settings - Fork 665
Description
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.