◐ Shell
clean mode source ↗

Message 209084 - Python tracker

> Proposed patch for as_completed().

Could you please try to write a unit test. The unit test should fail without the patch, and fail with the patch. Then create a new patch including the patch.

If it's tricky to write a reliable test reproducing the race condition, you can use unittest.mock to mock some objects.