Commit 9757e55d0c365901b8de39045c84bc6556c69e83
queue using port instead of port name
Signed-off-by: wanderer <mjbecze@gmail.com>wanderer committed on 8/22/2017, 8:12:05 PM
Parent: eeafed5ddfd0f8034e4ba37b0227fb7a2a470c3c
Files changed
index.js | changed |
kernel.js | changed |
index.js | ||
---|---|---|
@@ -53,9 +53,9 @@ | ||
53 | 53 | async send (port, message) { |
54 | 54 | const id = port.destId |
55 | 55 | if (id) { |
56 | 56 | const instance = await this.getInstance(id) |
57 | - instance.queue(port.destName, message) | |
57 | + instance.queue(port, message) | |
58 | 58 | } else { |
59 | 59 | // port is unbound |
60 | 60 | port.destPort.messages.push(message) |
61 | 61 | } |
kernel.js | ||
---|---|---|
@@ -33,10 +33,10 @@ | ||
33 | 33 | * adds a message to this containers message queue |
34 | 34 | * @param {string} portName |
35 | 35 | * @param {object} message |
36 | 36 | */ |
37 | - queue (portName, message) { | |
38 | - this.ports.queue(portName, message) | |
37 | + queue (port, message) { | |
38 | + this.ports.queue(port.destName, message) | |
39 | 39 | this._startMessageLoop() |
40 | 40 | } |
41 | 41 | |
42 | 42 | async create (message) { |
Built with git-ssb-web