Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:
Thank for the feedback. I'll revise the patch tomorrow based on your code-cleanup suggestions. To answer your question about the thread and explain why the test sometimes passes: The goal of test_changing_value is to try to trigger a race condition that exists inside many of these function. So, yes, the thread is necessary. :) Thankfully the functions call Py_BEGIN_ALLOW_THREADS; otherwise, I'd have to launch another process to try to trigger it. Sometimes we never manage to hit the race condition and the test passes even though the bug is present. I can increase the number of attempts to trigger it (currently "for _ in range(100)") to make it more likely to occur every time the test is run. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2810> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com