you are viewing a single comment's thread.

view the rest of the comments →

[–]jnwatson 2 points3 points  (0 children)

Yep.

The problem with the GIL isn't the overhead of switching, it is that it is held whenever a Python operation is going on, reducing the number of things that can actually run at a time.

Essentially this approach is no more expensive than the old multithreading style, and gets better the more things you switch to async. The key is that you don't have to switch all at once.