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.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com