On Tue, May 15, 2012 at 1:18 PM, Neilen Marais <
nma...@ska.ac.za> wrote:
> Is it possible to communicate to a gevent tasks from another thread
> via gevent.Queue? I have to interact with other threaded libraries
> involving callbacks, and would like to use an actor like pattern where
> each callback from another thread puts something on the gevent based
> actor's queue.
No, it's not possible. Nothing is thread-safe in gevent except for
stuff in threadpool.py and async watcher.
On Wed, May 16, 2012 at 12:09 AM, Paul Giannaros
<
p.a.gi...@gmail.com> wrote:
> Under unix you can use non-blocking pipes (os.pipe/fcntl) – write to the
> pipe from your thread and gevent.select the pipe from a greenlet. I'd be
> interested to hear if there's a better way though, particularly one that
> works under windows.
Use the async watcher instead. It is also cross platform.
To find more about async watcher search this group:
http://groups.google.com/group/gevent/search?group=gevent&q=async+watcher&qt_g=Search+this+group