Skip to content

Comments

feat: Add asyncio support to publish function#336

Open
nwekealex65 wants to merge 1 commit intofedora-infra:developfrom
nwekealex65:async_based_publish
Open

feat: Add asyncio support to publish function#336
nwekealex65 wants to merge 1 commit intofedora-infra:developfrom
nwekealex65:async_based_publish

Conversation

@nwekealex65
Copy link
Contributor

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
Contributor 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.

2 participants