|
|
|
|
|
by elpres
3684 days ago
|
|
Doesn't this second decorator only work with functions doing IO or releasing the GIL in any other way (like time.sleep() that they use in the example)? If all the function is doing is actual computation (i.e. using the CPU), no other code can run in parallel with it because of the GIL. |
|
* running multiple Database queries
* SSH-ing into multiple devices to run a command
* loading multiple web pages
* calling multiple APIs