Handle auto-created event loop when starting async spin#41
Handle auto-created event loop when starting async spin#41
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".
| def start_spinning_async(self, func, condition_fn, *args, **kwargs): | ||
| """ |
There was a problem hiding this comment.
Avoid awaiting spin task in wrapper
start_spinning_async is now a synchronous function that immediately returns the spin task (lines 388-389), but start_spinning_async_wrapper still does task = await self.start_spinning_async(...) with wait=False on line 438. Because the awaited object is the long-running spin task, the wrapper now blocks (and can propagate CancelledError) instead of returning immediately unless wait=True. Any async caller using the wrapper with the default wait=False will hang until the spin loop ends, which is a regression from the prior fire-and-forget behavior.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task