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 maggyero
Recipients asvetlov, bquinlan, lukasz.langa, maggyero, methane, ned.deily, pitrou, serhiy.storchaka
Date 2019-06-15.17:49:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org>
In-reply-to
Content
The following code hangs forever instead of printing "called" 10 times:

    from concurrent.futures import ProcessPoolExecutor
    
    class A:
        def f(self):
            print("called")
    
    class B(A):
        def f(self):
            executor = ProcessPoolExecutor(max_workers=2)
            futures = [executor.submit(super(B, self).f)
                       for _ in range(10)]
    
    if __name__ == "__main__":
        B().f()

The same code with `super(B, self)` replaced with `super()` raises the following error:

> TypeError: super(type, obj): obj must be an instance or subtype of type

However, replacing `ProcessPoolExecutor` with `ThreadPoolExecutor` works  as expected, but only with `super(B, self)` (with `super()` it still raises the same error).
History
Date User Action Args
2019-06-15 17:49:58maggyerosetrecipients: + maggyero, bquinlan, pitrou, ned.deily, asvetlov, methane, lukasz.langa, serhiy.storchaka
2019-06-15 17:49:58maggyerosetmessageid: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org>
2019-06-15 17:49:58maggyerolinkissue37294 messages
2019-06-15 17:49:58maggyerocreate