We have an existing codebase that is heavily Thread
based which we're trying to expose through flask-socketio. I can't find a mechanism to have a greenlet wait for data from a Thread without blocking all of gevent or through a polling loop.
I thought maybe I could use an unbounded gevent Queue
and call put
from the Thread
but that didn't seem to work. Also, the application is not performant enough with long polling so we can't use threads for socketio.
Is there a mechanism to receive data from the Thread
in a greenlet without the greenlet blocking all of gevent?