Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

- The things_to_do static variable should be declared as "volatile": it
is read by the main loop without any lock.
(by the way, could you rename it to something like "pendingcalls_to_do"?)

- in the old Py_MakePendingCalls function, the "#ifdef WITH_THREAD" part
is not useful now. 

- the "XXX" comments should probably be rewritten.

A note to people concerned by performance: the additional lock is used
only when there is an actual pending call to process. The main loop only
regularly checks the "things_to_do static" volatile static variable, and
the patch does not change this.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4293>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to