Allow access to new Actor handle on spawn (is this safe?)
This commit is contained in:
parent
951598b7d0
commit
33ac308564
|
@ -326,12 +326,12 @@ export class Turn {
|
|||
}
|
||||
|
||||
// Alias for syndicatec code generator to use
|
||||
_spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): void {
|
||||
this.spawn(bootProc, initialAssertions);
|
||||
_spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): Actor {
|
||||
return this.spawn(bootProc, initialAssertions);
|
||||
}
|
||||
|
||||
spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): void {
|
||||
this.__spawn(bootProc, initialAssertions);
|
||||
spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): Actor {
|
||||
return this.__spawn(bootProc, initialAssertions);
|
||||
}
|
||||
|
||||
__spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): Actor {
|
||||
|
@ -348,15 +348,16 @@ export class Turn {
|
|||
}
|
||||
|
||||
// Alias for syndicatec code generator to use
|
||||
_spawnLink(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): void {
|
||||
this.spawnLink(bootProc, initialAssertions);
|
||||
_spawnLink(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): Actor | null {
|
||||
return this.spawnLink(bootProc, initialAssertions);
|
||||
}
|
||||
|
||||
spawnLink(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): void {
|
||||
if (!this.activeFacet.isLive) return;
|
||||
spawnLink(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): Actor | null {
|
||||
if (!this.activeFacet.isLive) return null;
|
||||
const newActor = this.__spawn(bootProc, initialAssertions);
|
||||
this.activeFacet._halfLink(newActor.root);
|
||||
newActor.root._halfLink(this.activeFacet);
|
||||
return newActor;
|
||||
}
|
||||
|
||||
stopActor(): void {
|
||||
|
|
Loading…
Reference in New Issue