Skip to content

Add a util.MultiWaiter class for waiting on many events#175

Merged
msullivan merged 3 commits into
mainfrom
waiter
Jun 16, 2026
Merged

Add a util.MultiWaiter class for waiting on many events#175
msullivan merged 3 commits into
mainfrom
waiter

Conversation

@msullivan

Copy link
Copy Markdown
Contributor

The big differences/advantages compared to asyncio.wait:

  • New futures to wait on may be added while the object
    is already being waited on
  • Completion order of the tasks is not lost. However, completion
    batching is, which is actually a plus for us.
    I think that MultiWaiter should be deterministic enough to use
    with workflows/temporal.

Update ToolRunner and merge to use this, though I'm not sure the merge
one is an improvement.

@msullivan msullivan requested review from 1st1 and anbuzin June 16, 2026 20:35
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-python Ready Ready Preview, Comment Jun 16, 2026 8:39pm

The big differences/advantages compared to asyncio.wait:
 * New futures to wait on may be added while the object
   is already being waited on
 * Completion order of the tasks is not lost. However, completion
   *batching* is, which is actually a plus for us.
   I think that MultiWaiter should be deterministic enough to use
   with workflows/temporal.
I'm not sure if this one is an improvement though
@msullivan msullivan merged commit aea6ad9 into main Jun 16, 2026
7 checks passed
@msullivan msullivan deleted the waiter branch June 16, 2026 22:29
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