It's not even remotely the same thing. First off Goroutines are about 2kbs and they are controlled by the Go scheduler. The scheduler decides if they should be on another thread or cpu. Sure hardware can change this dynamic but how you organize them is based on the logic of your code. Not per thread or cpu. (Which is then obviously controlled by your os. The structuring of the Goroutines stays the same nomatter your hardware. The scheduler knowing when to grow or shrink them is independent of the os. Async in JavaScript just says spin another process while this code runs...... That's it.
With node you are still binding to c and the author says it's not a good idea.
With node you are still binding to c and the author says it's not a good idea.
I'd like to see which "author" says this as it pertains the core filesystem interop of node.
Stop acting like you're using some third party extension in node. You aren't. Libuv is just as central to node as V8 is.
If you're referring to Dahl's complaints about node, then he's not referring to using native code, he's specifically referring to binding to C as it's unsafe. In Deno he's just using a Rust library instead to fill the same role.
1
u/[deleted] May 11 '20
It's not even remotely the same thing. First off Goroutines are about 2kbs and they are controlled by the Go scheduler. The scheduler decides if they should be on another thread or cpu. Sure hardware can change this dynamic but how you organize them is based on the logic of your code. Not per thread or cpu. (Which is then obviously controlled by your os. The structuring of the Goroutines stays the same nomatter your hardware. The scheduler knowing when to grow or shrink them is independent of the os. Async in JavaScript just says spin another process while this code runs...... That's it.
With node you are still binding to c and the author says it's not a good idea.
How is that the same thing?