3 ms·
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'.
by tinco 9y ago
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'.
- JulianWasTaken 9y agoThat'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.
- dragonwriter 9y agoThat'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).