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

Changed default get_message timeout behaviour to block execution instead of poll indefinately with 100% CPU usage #3341

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NadavTasher
Copy link

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

Description of change

As can be seen here, when using get_message (Pub/Sub) without specifying a timeout, the default behaviour is to not block but instead return immediately, causing infinite loops running at 100% CPU.
With asyncio this is extremely frustrating since the whole point of await is to wait for what is supposedly a blocking operation.

@NadavTasher NadavTasher force-pushed the bugfix/change-default-get-message-timeout-behaviour branch from 408c318 to a03c87b Compare July 31, 2024 17:00
@lfos
Copy link

lfos commented Oct 15, 2024

For visibility: This PR addresses issue #3208. I hope we can get this merged soon, as it's been causing me (and others) a fair amount of headache.

@NadavTasher
Copy link
Author

I would love that!
Anything I can do?

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