Commit e7b099fed186b0b8d802dfde9d96da2c3bb118f1
Mark initialise/run async
Alex Beregszaszi committed on 7/21/2017, 7:32:57 PMParent: 46a9266387de41c0e573760363c7edc1452e1d9d
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -10,16 +10,16 @@ | ||
10 | 10 … | // In general, a root instance receives no message, but every other instance |
11 | 11 … | // receives a message with a singel port, which is a channel to its parent (aka the root). |
12 | 12 … | // |
13 | 13 … | // Optionally it can return a single value. |
14 | - initialize (message) { | |
14 … | + async initialize (message) { | |
15 | 15 … | throw new Error('Unimplemented initialiser') |
16 | 16 … | } |
17 | 17 … | |
18 | 18 … | // This is called for each incoming message the container gets. |
19 | 19 … | // |
20 | 20 … | // Optionally it can return a single value. |
21 | - run (message) { | |
21 … | + async run (message) { | |
22 | 22 … | throw new Error('Unimplemented message: ' + message.data) |
23 | 23 … | } |
24 | 24 … | |
25 | 25 … | // onIdle is called when there are no more immediate messages pending |
Built with git-ssb-web