[issue15320] thread-safety issue in regrtest.main()

Amaury Forgeot d'Arc report at bugs.python.org
Thu Jul 12 09:46:43 CEST 2012


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

> I wrote this patch with the assumption that it shouldn't hurt
> if multiple threads call deque.extend() at the same time.

By looking at the implementation, I found that if multiple threads call dequeue.extend() at the same time, all items will be added, but the order is not deterministic.
It probably does not matter for tests.

In any case, I think we should not rely on this specific implementation.  We should document which functions are safe to use in a multithreading environment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15320>
_______________________________________


More information about the Python-bugs-list mailing list