parent: return latch to wait() caller to allow graceful timeout
This commit is contained in:
parent
b0309b539c
commit
ff7fb00569
|
@ -917,6 +917,11 @@ Context Class
|
|||
:param bool wait:
|
||||
If :py:data:`True`, block the calling thread until the context has
|
||||
completely terminated.
|
||||
:returns:
|
||||
If `wait` is :data:`False`, returns a :class:`mitogen.core.Latch`
|
||||
whose :meth:`get() <mitogen.core.Latch.get>` method returns
|
||||
:data:`None` when shutdown completes. The `timeout` parameter may
|
||||
be used to implement graceful timeouts.
|
||||
|
||||
.. method:: call_async (fn, \*args, \*\*kwargs)
|
||||
|
||||
|
|
|
@ -806,7 +806,8 @@ class Context(mitogen.core.Context):
|
|||
|
||||
if wait:
|
||||
latch.get()
|
||||
return latch
|
||||
else:
|
||||
return latch
|
||||
|
||||
|
||||
class RouteMonitor(object):
|
||||
|
|
Loading…
Reference in New Issue