oremanj / greenback

Reenter an asyncio or Trio event loop from synchronous code
https://greenback.readthedocs.io/
Other
80 stars 2 forks source link

use greenback to yield across generators #21

Closed hu6360567 closed 8 months ago

hu6360567 commented 1 year ago

Hi,

The problem is describe here.

Somehow, I found greenback makes the sync code can interact with async code in async context. My 2nd attempts somehow works out, but the queue is not limited to 1, which set as max_size. Also, is there any recommendation for my example code. It really messed up to get result from in-thread event loop.

oremanj commented 8 months ago

greenback is not the right tool for this; there's no async environment involved in your program. It looks like you got a useful response to your question on stackoverflow, so I'm going to close this issue.