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

Chris Jerdonek report at bugs.python.org
Tue Jul 10 22:50:37 CEST 2012


New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:

My understanding is that generators are not thread-safe.  For example, see

http://stackoverflow.com/a/1131458/262819

However, regrtest.main() seems to access a generator from multiple threads when run in multiprocess mode:

def work():
    # A worker thread.
    try:
        while True:
            try:
                test, args_tuple = next(pending)
            except StopIteration:
                output.put((None, None, None, None))
                return

http://hg.python.org/cpython/file/2ecdda96f970/Lib/test/regrtest.py#l632

----------
components: Tests
keywords: easy
messages: 165203
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: thread-safety issue in regrtest.main()
versions: Python 3.3

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


More information about the New-bugs-announce mailing list