News for hackers. Stuff that matters.
Re:Go-like channels in 10 lines of JavaScript by coffeebeqn on Saturday February 04, 2023 @06:08PM (#34659402)
Or use a language that supports multi threading in some sensible manner..
Re:Go-like channels in 10 lines of JavaScript by eurasiantiger on Saturday February 04, 2023 @06:53PM (#34659817)
You’re asking for low-level features. JS is a high-level language.
Re:Go-like channels in 10 lines of JavaScript by dragonwriter on Saturday February 04, 2023 @06:59PM (#34659883)
High level languages can have parallelism constructs. E.g., Ruby, in which threads have limited parallelism (only when running lower-level code that releases the GVL) has Ractors, which run Ruby code in parallel.
Re:Go-like channels in 10 lines of JavaScript by coffeebeqn on Saturday February 04, 2023 @09:31PM (#34661081)
I’m just saying if you want parallelism then don’t write things in JavaScript