Reuse LocalAction definition

This commit is contained in:
Tony Garnock-Jones 2021-02-23 11:17:38 +01:00
parent f0c1c8665e
commit ba2b2edfc3
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ export class Turn {
readonly queues: Map<Actor, LocalAction[]> = new Map();
readonly tasks: Array<LocalAction> = [];
static for(actor: Actor, f: (t: Turn) => void): void {
static for(actor: Actor, f: LocalAction): void {
const t = new Turn(actor);
f(t);
t.complete();
@ -82,7 +82,7 @@ export class Turn {
return new Ref(this.actor, t);
}
spawn(bootProc: (t: Turn) => void, initialAssertions = new IdentitySet<Handle>()): void {
spawn(bootProc: LocalAction, initialAssertions = new IdentitySet<Handle>()): void {
this.tasks.push(() => {
const newOutbound: OutboundMap = new Map();
initialAssertions.forEach(key => {