Commit 1be1cba2ec920cea5294cc3638577a736d106be5
rename containerState -> running
wanderer committed on 11/21/2017, 11:18:23 PMParent: 67c9bed0cd1069c22fa25d29409522cfc5da85af
Files changed
actor.js | changed |
actor.js | ||
---|---|---|
@@ -24,9 +24,9 @@ | ||
24 | 24 | hypervisor: opts.hypervisor |
25 | 25 | }) |
26 | 26 | |
27 | 27 | this.ticks = 0 |
28 | - this.containerState = 'idle' | |
28 | + this.running = false | |
29 | 29 | |
30 | 30 | this.caps = new CapsManager(opts.state.caps) |
31 | 31 | } |
32 | 32 | |
@@ -67,10 +67,10 @@ | ||
67 | 67 | |
68 | 68 | // waits for the next message |
69 | 69 | async _startMessageLoop () { |
70 | 70 | // this ensure we only every have one loop running at a time |
71 | - if (this.containerState !== 'running') { | |
72 | - this.containerState = 'running' | |
71 | + if (!this.running) { | |
72 | + this.running = true | |
73 | 73 | while (1) { |
74 | 74 | const message = await this.inbox.nextMessage() |
75 | 75 | if (!message) break |
76 | 76 | |
@@ -83,9 +83,9 @@ | ||
83 | 83 | // run the next message |
84 | 84 | await this.message(message) |
85 | 85 | } |
86 | 86 | |
87 | - this.containerState = 'idle' | |
87 | + this.running = false | |
88 | 88 | this.container.onIdle() |
89 | 89 | } |
90 | 90 | } |
91 | 91 |
Built with git-ssb-web