Deno: Question: Is Deno limited to a single thread per OS Process?

Created on 3 Feb 2019  路  6Comments  路  Source: denoland/deno

Apologies if this out of scope. I am also out of my technical depth.

As background, CouchDB currently uses their own C/C++ bindings to Spidermonkey in order provide the JS runtime for its maps, views, validation, etc. As this is burdensome, their JS runtime is quite old and they seem to be looking for an alternative to maintaining their own bindings.

I suggested using Deno but their feedback was that because (of v8?) deno can only one be single threaded per OS Process. And therefore not NIF-able in Erlang. Is this true? If so, are there other use cases outside of CouchDB where this limitation would be problematic to adoption? Would it be hard to overcome this limitation?

Most helpful comment

Yes, my mission was accomplished by getting Deno on the CouchDB team's radar.

All 6 comments

I believe workers are essentially separate threads. Deno has basic worker implemented but have not yet exposed to the userland. In the meantime Deno, like Node, uses a thread pool internally for async io tasks.

Somewhat related to #1666

FYI @akircher Web Workers were released with Deno v0.3.6

Thanks @bartlomieju I will update the thread in couchdb!

@akircher can we close this issue now?

Yes, my mission was accomplished by getting Deno on the CouchDB team's radar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kitsonk picture kitsonk  路  3Comments

watilde picture watilde  路  3Comments

JosephAkayesi picture JosephAkayesi  路  3Comments

benjamingr picture benjamingr  路  3Comments

doutchnugget picture doutchnugget  路  3Comments