This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek
Date 2012-07-10.20:50:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341953437.79.0.355330793609.issue15320@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2012-07-10 20:50:37chris.jerdoneksetrecipients: + chris.jerdonek
2012-07-10 20:50:37chris.jerdoneksetmessageid: <1341953437.79.0.355330793609.issue15320@psf.upfronthosting.co.za>
2012-07-10 20:50:37chris.jerdoneklinkissue15320 messages
2012-07-10 20:50:36chris.jerdonekcreate