2 ms·
I agree TS is great. Not really multi threaded kills it for me though.
by rr888 4y ago
I agree TS is great. Not really multi threaded kills it for me though.
- jdlshore 4y agoThreads are a function of the environment, and are available in TS and other compiles-to-JS languages: Node.js: https://nodejs.org/api/worker_threads.html https://nodejs.org/api/worker_threads.html Browser: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers... However, threads are very rarely needed. The common use case in other languages is I/O, and JS environments handle that with async I/O—a superior choice, IMO.
- illiarian 4y agoNeither of those are proper threads, and they have various limitations placed on them. And the language and the VM has been, and will be for any foreseeable future, single-threaded.
- postdb 4y agoDeno supports vastly superior threading model (such as green threads). Again depending on what you are coding, threading may not be the best model. Look at Ngnix vs Apache (event driven vs threading).
- illiarian 4y ago> Deno supports vastly superior threading model (such as green threads) Whatever it supports, Javascript-the-language has no concept of threads. And workers are basically external processes with a somewhat awkward event-based communication and certain limitations. Whatever Deno uses internally to implement them has no bearing.
- 5e92cb50239222b 4y agoJFYI, apache httpd has had a similar event-driven request processing module for about 10 years, maybe more. https://httpd.apache.org/docs/2.4/mod/event.html https://httpd.apache.org/docs/2.4/mod/event.html