Message303469
> Compare-and-exchange is sufficient for avoiding the GIL contention
> I describe above.
If Python objects are involved, it is more complicated than you suggest. Possibly, multiprocessing can offer a shared counter that creates integer objects on demand and that offers guaranteed atomic increments and decrements (as semaphores) do.
> one of the nice things about multiprocessing is avoiding
> GIL-introduced latency!
The primary way it achieves this benefit is by avoiding shared state altogether. |
|
| Date |
User |
Action |
Args |
| 2017-10-01 17:19:48 | rhettinger | set | recipients:
+ rhettinger, amaury.forgeotdarc, belopolsky, pitrou, meador.inge, davin, Daniel Colascione |
| 2017-10-01 17:19:48 | rhettinger | set | messageid: <1506878388.13.0.213398074469.issue31654@psf.upfronthosting.co.za> |
| 2017-10-01 17:19:48 | rhettinger | link | issue31654 messages |
| 2017-10-01 17:19:48 | rhettinger | create | |
|