Support stopping a root facet, such as happens when a link between actors is broken
This commit is contained in:
parent
5455392efc
commit
20b83aa5a5
|
@ -302,10 +302,14 @@ export class Turn {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop(facet: Facet = this.activeFacet, continuation?: LocalAction) {
|
stop(facet: Facet = this.activeFacet, continuation?: LocalAction) {
|
||||||
this.enqueue(facet.parent!, () => {
|
if (facet.parent === null) {
|
||||||
facet._terminate(true);
|
this.stopActor();
|
||||||
if (continuation) continuation();
|
} else {
|
||||||
});
|
this.enqueue(facet.parent, () => {
|
||||||
|
facet._terminate(true);
|
||||||
|
if (continuation) continuation();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alias for syndicatec code generator to use
|
// Alias for syndicatec code generator to use
|
||||||
|
|
Loading…
Reference in New Issue