4 ms·
Depends on how much memory we're talking about. In regard to GCD - AFAIK it uses classic posix threads. In regard to GIL, if you can indeed guarantee that each
by mdomans 10y ago
Depends on how much memory we're talking about.
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
- danpalmer 10y agoI believe GCD actually multiplexes green threads across a pool of posix threads, which wouldn't work for Python because of the GIL.
- richardwhiuk 10y agoCorrect. GCD has dispatch_queues, and each block on the dispatch queue will be executed on one of a pool of posix threads.
- mdomans 10y agoThat's correct, but looking at the Python internals it seems that working around the GIL is possible if having this pattern exposed to end programmer.