Skip to content

Refactor BaseInterface context and stop.#506

Merged
fleming79 merged 1 commit into
mainfrom
maintenance
Jun 23, 2026
Merged

Refactor BaseInterface context and stop.#506
fleming79 merged 1 commit into
mainfrom
maintenance

Conversation

@fleming79

Copy link
Copy Markdown
Owner

No description provided.

@fleming79 fleming79 merged commit df15254 into main Jun 23, 2026
38 of 39 checks passed
@fleming79 fleming79 deleted the maintenance branch June 23, 2026 09:04
@x42005e1f

x42005e1f commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

There is aiologic.lowlevel.async_sleep_forever(). It is much more efficient and also does not suffer from the math.inf issue (since it uses a different approach to waiting; you can check _time.py if you want).

@fleming79

Copy link
Copy Markdown
Owner Author

Okay thanks for that. I didn't even think to check if you'd provided one.

Are you planning to adjust your _MAXIMUM_SECONDS_PER_SLEEP based on what Pyodide decided? Not perfect, but it is an improvement on the current behavior.

@x42005e1f

Copy link
Copy Markdown
Contributor

Yes, I think that makes sense. Most of my analysis has focused on standard event loops, so for now, the code assumes that the overflow issue is handled by the event loop itself. I probably cannot do it today, since I am too busy, but I might be able to fix it one of the next few days.

@fleming79

Copy link
Copy Markdown
Owner Author

It can probably just be an issue to leave open. It is a pretty rare issue.

@x42005e1f

Copy link
Copy Markdown
Contributor

But it is also an issue that can cause damage almost silently. The probability of an issue occurring is just one component of the risk it poses. For example, many thread-safety issues are very rare, but even so, they are taken quite seriously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants