Document issues with Concurrent Listeners in `Promise.race` and Event Loop Behavior
- Dominant language
- TypeScript
- Stars
- 52
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I’m encountering an issue with handling multiple user interaction options in my application. Specifically, I want to allow users to interact via either `callbackQueries` or `messages`. To achieve this, I’ve been using `Promise.race([Promise1, Promise2])` to wait for the first resolved interaction.
The issue occurs after several conversational flows, where unused listeners appear to linger in the event loop, delaying the triggering of the next interaction. As a result, I have to repeat the unused interaction multiple times before the current listener is activated.
I suspect this might be a bug, but it would also be great if a feature for handling multiple conversation choices could be added.
Thanks for your time, and I look forward to your insights on this!
Contributor guide
Research direction
The issue names no documentation file, test, or entry point. Start by reviewing the documentation covering callbackQueries, messages, Promise.race, and event-loop behavior; done means a scoped documentation change that clearly explains the observed behavior or supported approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100