You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test attempts to ensure that the executor doesn't hold on to the result object, but the executor necessarily holds onto it for a brief period from when it sets the result in in the future until the variable goes out of scope.
We should use support.sleeping_retry to check if the weakref eventually (ideally quickly) becomes dead.
======================================================================
FAIL: test_free_reference (test.test_concurrent_futures.test_thread_pool.ThreadPoolExecutorTest.test_free_reference)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_concurrent_futures/executor.py", line 132, in test_free_reference
self.assertIsNone(wr())
~~~~~~~~~~~~~~~~~^^^^^^
AssertionError: <test.test_concurrent_futures.executor.MyObject object at 0x200041b0100> is not None
----------------------------------------------------------------------
Bug report
Seen in https://buildbot.python.org/#/builders/1368/builds/2775/steps/6/logs/stdio
The test attempts to ensure that the executor doesn't hold on to the result object, but the executor necessarily holds onto it for a brief period from when it sets the result in in the future until the variable goes out of scope.
We should use
support.sleeping_retry
to check if the weakref eventually (ideally quickly) becomes dead.cpython/Lib/test/test_concurrent_futures/executor.py
Lines 125 to 132 in 12db452
cpython/Lib/concurrent/futures/thread.py
Lines 85 to 92 in 12db452
Linked PRs
sleeping_retry
intest_free_reference
#130958The text was updated successfully, but these errors were encountered: