3 ms·
Ah, I see the confusion in what I’ve said. Yes the IO calls themselves are blocking but you can easily wrap them in separate OS threads. The GVL will release w
by Lio 6y ago
Ah, I see the confusion in what I’ve said. Yes the IO calls themselves are blocking but you can easily wrap them in separate OS threads.
The GVL will release when the IO call blocks allowing another OS thread, including the parent, to continue.
That allows you to make blocking calls in parallel but is heavier weight than using the new scheduler and fibres for those parallel IO calls.
In the case of ActiveRecord I think it’s down to the database driver implementation, anyone who knows care to comment?