Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a waitTime of zero. #19

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Allow a waitTime of zero. #19

merged 1 commit into from
Jan 7, 2025

Conversation

jmigueprieto
Copy link
Contributor

@jmigueprieto jmigueprieto commented Jan 7, 2025

There's an issue with waitTime: the wait/sleep will be in vain unless another thread calls __peekedMessages() (to consume messages) at the exact time.

Let's allow waitTime: 0 to prevent this scenario in which waitTime just adds latency.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…less another thread called __peekedMessages at the exact time it was sleeping.
@jmigueprieto jmigueprieto self-assigned this Jan 7, 2025
@jmigueprieto jmigueprieto marked this pull request as ready for review January 7, 2025 00:35
@v1r3n v1r3n merged commit 22c5983 into main Jan 7, 2025
3 checks passed
@v1r3n v1r3n deleted the fix/wait-time-issues branch January 7, 2025 19:37
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.

None yet

2 participants