6 Replies
No built-in api, but compatible with node
you can try it in deno 👇
That’s strange that there’s no Deno native implementation but the Node compatibility layer is already there 🤔
Yes, I also think this is the missing part of the deno native api
Navigator: hardwareConcurrency property - Web APIs | MDN
The navigator.hardwareConcurrency read-only property
returns the number of logical processors available to run threads on the user's
computer.
I've raised an issue for all to discuss
https://github.com/denoland/deno/issues/20933
GitHub
deno native os api enhancements · Issue #20933 · denoland/deno
Ref context: https://discord.com/channels/684898665143206084/1164090264852369458 deno native os api seems to be missing a lot of node compatibility layers for example 👇 import os from "node:os...
Since the standard hardware concurrency API exists I don't think a custom alternative would serve any purpose.