3 ms·
According to the Node 11 docs, worker threads are more lightweight than processes, but still heavy. That makes me think they run in the same address space, but
by akvadrako 8y ago
According to the Node 11 docs, worker threads are more lightweight than processes, but still heavy.
That makes me think they run in the same address space, but use separate runtimes. So it's more scalable than ruby and python threads or multiprocessing.
- hardwaresofton 8y agoA good article on them: https://medium.com/lazy-engineering/node-worker-threads-b57a32d84845 https://medium.com/lazy-engineering/node-worker-threads-b57a...
- jashmatthews 8y agoJRuby doesn't have a GIL to begin with so there's no requirement to use multiprocessing to host Rails apps etc. They're an improvement over a single GIL but not by much. IIUC, they're like Racket's Places: a complete duplication of the VM but sharing an address space. The basic implementation doesn't really save much memory but it's a bit more convenient. There's been a couple of attempts to implement subinterpreters for CRuby too.
- regularfry 8y agoJRuby is an incredibly underrated piece of kit. That startup time, though...