Skip to content

Conversation

@almarklein
Copy link
Member

In tests that I ran earlier on Windows, there were quite a few warnings from the CallLaterThread. When the loop closes when a normal await sleep(..) is waiting, the task is simply cancelled at its done. But with a sleep that runs via the CallLaterThread, the thread will try to invoke a callback in the main thread via the loop, which is now closed, which gives a warning.

In #162 this effect was already reduced by confining the use of precise_sleep to the scheduler. This PR explicitly suppresses such warnings, since they can in occur in normal operation closely after a loop is closed.

While investigating this, I came across some more warnings due to asyncio loops not being closed in the tests. I fixes these too.

@almarklein almarklein marked this pull request as ready for review December 20, 2025 22:53
@almarklein almarklein merged commit be4750c into main Dec 23, 2025
20 checks passed
@almarklein almarklein deleted the less-warnings-in-tests branch December 23, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants