[Python-Dev] [Python-ideas] Remove GIL with CAS instructions? (original) (raw)
Sturla Molden sturla at molden.no
Thu Oct 22 23:42:32 CEST 2009
- Previous message: [Python-Dev] [Python-ideas] Remove GIL with CAS instructions?
- Next message: [Python-Dev] Proposal: Moratorium on Python language changes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip Sitbon skrev:
Some of this is more low-level. I did see higher performance when using non-Event objects, although I have not had time to follow up and do a deeper analysis. The GIL flashing "problem" with critical sections can very likely be rectified with a call to Sleep(0) or YieldProcessor() for those who are worried about it. For those who don't know what Sleep(0) on Windows does: It returns the reminder of the current time-slice back to the system is a thread with equal or higher-priority is ready to run. Otherwise it does nothing.
GIL flashing is a serious issue if it happens often; with the current event-based GIL on Windows, it never happens (61 cases of GIL flash in 100,000 periodic checks is as good as never).
S.M.
- Previous message: [Python-Dev] [Python-ideas] Remove GIL with CAS instructions?
- Next message: [Python-Dev] Proposal: Moratorium on Python language changes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]