Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| loop = asyncio.get_running_loop() | ||
| except RuntimeError: | ||
| asyncio.run(self.stop_spinning_async()) | ||
| else: |
There was a problem hiding this comment.
Stop async spins on wrong loop
stop_spinning now runs stop_spinning_async() via asyncio.run when no loop is running (lines 496-499), but stop_spinning_async awaits self._task, which remains bound to the loop that created it. When the spin is running on an owned/background loop, calling stop_spinning() from sync code now raises RuntimeError: ... attached to a different loop and leaves the task running. The cleanup coroutine needs to be scheduled on the task’s loop (e.g., via self._own_loop/run_coroutine_threadsafe) instead of a fresh loop.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task