Skip to content

Support concurrent blocking asks#49

Open
davidmoshal wants to merge 1 commit into
nicobailon:mainfrom
davidmoshal:issue-47-keyed-reply-waiters
Open

Support concurrent blocking asks#49
davidmoshal wants to merge 1 commit into
nicobailon:mainfrom
davidmoshal:issue-47-keyed-reply-waiters

Conversation

@davidmoshal

Copy link
Copy Markdown

Refs #47.

This is the fuller fix for concurrent blocking intercom({ action: "ask" }) calls. It replaces the singleton reply waiter with waiters keyed by the generated question id, resolves replies by message.replyTo, validates the reply sender, and rejects all outstanding waiters on disconnect or shutdown.

This lets one session ask multiple peers concurrently and receive independent replies.

Validation:

  • Added concurrent ask coverage for independent delivery and reply resolution.
  • Added wrong-sender replyTo coverage.
  • Added shutdown cleanup coverage for concurrent asks.
  • Added concurrent supervisor decision coverage.
  • Ran npm test locally: 40 passing tests.

This PR is the recommended alternative to the single-flight guard PR; the maintainer should choose one direction rather than merging both as independent fixes.

@davidmoshal davidmoshal marked this pull request as ready for review June 24, 2026 01: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.

1 participant