News for hackers. Stuff that matters.
Re:Python Concurrency Decorators by elpres on Friday May 13, 2016 @04:08AM (#11689239)
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.
Re:Python Concurrency Decorators by thebigspacefuck on Friday May 13, 2016 @10:40AM (#11690652)
Yes, that's right, it is best used for I/O-bound applications. You could use it for:

* running multiple Database queries

* SSH-ing into multiple devices to run a command

* loading multiple web pages

* calling multiple APIs