Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion: parallel: boolean option for Deno.serve() #25173

Closed
iuioiua opened this issue Aug 23, 2024 · 2 comments
Closed

suggestion: parallel: boolean option for Deno.serve() #25173

iuioiua opened this issue Aug 23, 2024 · 2 comments
Labels
perf performance related public API related to "Deno" namespace in JS serve suggestion suggestions for new features (yet to be agreed)

Comments

@iuioiua
Copy link
Contributor

iuioiua commented Aug 23, 2024

Would work the same as deno serve --parallel and be false by default.

- Deno.serve((_req) => new Response("Hello, world"));
+ Deno.serve({ parallel: true }, (_req) => new Response("Hello, world"));
@iuioiua iuioiua added perf performance related public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed) serve labels Aug 23, 2024
@lucacasonato
Copy link
Member

lucacasonato commented Aug 23, 2024

I don't see how this works. We can't fork JS execution when we hit a Deno.serve() with parellel: true. It'd have to be deno run --parallel.

@bartlomieju
Copy link
Member

Closing as adding parallel option is not feasible here. I'd rather explore adding deno run --parallel as suggested by Luca.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf performance related public API related to "Deno" namespace in JS serve suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

3 participants