Simplify
This commit is contained in:
parent
a813780e8d
commit
04d46585fd
|
@ -333,12 +333,9 @@ class Turn:
|
||||||
def stop(self, facet = None, continuation = None):
|
def stop(self, facet = None, continuation = None):
|
||||||
if facet is None:
|
if facet is None:
|
||||||
facet = self._facet
|
facet = self._facet
|
||||||
if facet.parent is None:
|
if continuation is not None:
|
||||||
self.stop_actor()
|
facet.on_stop(continuation)
|
||||||
else:
|
facet._terminate(True)
|
||||||
if continuation is not None:
|
|
||||||
facet.on_stop(continuation)
|
|
||||||
facet._terminate(True)
|
|
||||||
|
|
||||||
# can also be used as a decorator
|
# can also be used as a decorator
|
||||||
def on_stop(self, a):
|
def on_stop(self, a):
|
||||||
|
|
Loading…
Reference in New Issue