Re:Celery, non-blocking code and quest against coroutines
by danpalmer on Thursday June 09, 2016 @11:16AM
(#11869930)
I believe GCD actually multiplexes green threads across a pool of posix threads, which wouldn't work for Python because of the GIL.
Re:Celery, non-blocking code and quest against coroutines
by richardwhiuk on Thursday June 09, 2016 @12:23PM
(#11870400)
Correct. GCD has dispatch_queues, and each block on the dispatch queue will be executed on one of a pool of posix threads.
In regard to GCD - AFAIK it uses classic posix threads. In regard to GIL, if you can indeed guarantee that each task is atomic and lockless, you can use the same approach pyparralel uses