Author serhiy.storchaka
Recipients brett.cannon, chris.jerdonek, ezio.melotti, serhiy.storchaka, zach.ware
Date 2013-08-06.11:50:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375789806.76.0.676540869096.issue16968@psf.upfronthosting.co.za>
In-reply-to
Content
As far as I understand threads reaping needed only when ThreadPoolExecutor is used and children reaping needed only when ProcessPoolExecutor is used. Why not use them only in tests which needs them?

class ThreadPoolMixin(ExecutorMixin):
    executor_type = futures.ThreadPoolExecutor

    def run(self, result):
        key = test.support.threading_setup()
        try:
            return super().run(result)
        finally:
            test.support.threading_cleanup(*key)


class ProcessPoolMixin(ExecutorMixin):
    executor_type = futures.ProcessPoolExecutor

    def run(self, result):
        try:
            return super().run(result)
        finally:
            test.support.reap_children()
History
Date User Action Args
2013-08-06 11:50:06serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ezio.melotti, chris.jerdonek, zach.ware
2013-08-06 11:50:06serhiy.storchakasetmessageid: <1375789806.76.0.676540869096.issue16968@psf.upfronthosting.co.za>
2013-08-06 11:50:06serhiy.storchakalinkissue16968 messages
2013-08-06 11:50:06serhiy.storchakacreate