m
On Mon, May 20, 2013 at 05:01:28PM -0700, vitaly wrote:
> A gevent Greenlet in my app starts several objects, then needs to wait
> "forever" (until the main greenlet kills it), then stops those objects in
> the finally block. Is there a built-in gevent function that blocks
> forever, or should I create a gevent.event.Event instance (that will never
> get set) and wait on it instead?
> Thank you,
> Vitaly
>
> --
> You received this message because you are subscribed to the Google Groups
> "gevent: coroutine-based Python network library" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gevent+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Matt Billenstein
ma...@vazor.com
http://www.vazor.com/
It seems by definition you're not blocking forever, instead you're waiting on the main thread sending a kill "event" so yes, an event would be applicable. Then you'll want to join() that thread to give it time to "stop" its objects.
There's gevent.wait(): it puts main greenlet to sleep while there's
something to do (started servers, open connections, spawned
greenlets).
--
You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.