New submission from Kristján Valur Jónsson <krist...@ccpgames.com>:
As per Antoine's suggestion, here is a patch to improve condition variable emulation on windows. By using the windows Semaphore (which hasn't always been available) all of the problems in emulating condition variables using Events disappear. in particular, the "lost wakeup" bug can be elimintated, and the same object easily supports bot the "signal" and "broadcast" mode of waking up threads. We can also use the CRICITAL_SECTION objects as the associated mutex which is much lighter weight than using a kernel object. I do think I´ve caught all the corner cases. It is also simpler to prove because this construct is simpler than the previous one. If, however, i have missed a spot, I'd be interested to know about it. Not completely impossible since race conditions are devious beasts. Ive tested this extensively on Windows. See also issue 8299 where this implementation was presented. ---------- components: Interpreter Core files: nt_cond.patch keywords: needs review, patch, patch messages: 103251 nosy: krisvale, pitrou severity: normal status: open title: Improve condition variable emulation on NT versions: Python 3.2 Added file: http://bugs.python.org/file16934/nt_cond.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8411> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com