Re:Green Threads Explained
by tinco on Monday May 29, 2017 @01:17PM
(#14440151)
Ruby, Python are the prime examples of this. They use the multiple OS threads to run them, but actually use locks to force them to be 'green'.
[ Parent
| on HN ]
Re:Green Threads Explained
by JulianWasTaken on Monday May 29, 2017 @01:21PM
(#14440173)
That's not really accurate.
CPython threads are honest to goodness OS threads, the GIL has nothing to do with green-ness (and the GIL can be released).
greenlets are green threads, but they're cooperative.
Re:Green Threads Explained
by dragonwriter on Monday May 29, 2017 @02:09PM
(#14440490)
That's not green threading, it's just 1:1 native threading with a big lock, which has very different behavior than green threading (either 1:N or M:N).