Got into how JS works recently and many people were negative about JS being a single-threaded only language (even tho the situation is a bit more complicated with the Event Loop and Callbacks), and probably rightfully so i mean its 2019. But JS has now Worker threads: https://nodejs.org/api/worker_threads.html Which are stable.After reading how they work..They do seem quite similar to Go multithreading or any other language like Java or C#, you spawn a bunch of workers, you can give them all different data, you can communicate between them and you can basically control what each and every single one does and they all do their thing in parallel.Isnt this the textbook definition of a multithreaded language?
Submitted December 10, 2019 at 07:37AM by Flamyngoo
No comments:
Post a Comment