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

feat: Add asyncio support to publish function #336

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nwekealex65
Copy link

This pull request addresses issue #303

Changes Made:

  • Added support for asynchronous programming using asyncio to the publish function.
  • Utitlized async await syntax to make the function asynchronous.
  • Introduced error handling for asyncio.TimeoutError to handle timeouts.

Related Issue:
Issue #303

Please review and provide feedback. Thank you!

@abompard
Copy link
Member

The problem that needs fixing is that we want to allow asyncio applications to publish messages within the asyncio framework, not needing the thread pool. So what we need is an async publish function, not a sync publish function that calls asyncio.run(). This is why it's harder, we need to find a way to integrate the async function in Twisted.

@nwekealex65
Copy link
Author

The problem that needs fixing is that we want to allow asyncio applications to publish messages within the asyncio framework, not needing the thread pool. So what we need is an async publish function, not a sync publish function that calls asyncio.run(). This is why it's harder, we need to find a way to integrate the async function in Twisted.

So how do we go about this? Any suggestion?

@abompard
Copy link
Member

Well I have started working on it a couple months ago, spent a few days on it and stopped because I had other things to do and it was taking too long. I would suggest finding another issue, as I said before this one is definitely not a simple issue. If you manage do to that before the end of March, you should mentor me ;-)

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