git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 57fe8c94df56696aff95bff34ee487883b55c3e6

nits

wanderer committed on 7/6/2017, 2:31:20 AM
Parent: e8c964ddcc70bc84139efb764d6710b14d6470f5

Files changed

kernel.jschanged
kernel.jsView
@@ -52,11 +52,12 @@
5252 while (1) {
5353 const message = await this.ports.getNextMessage()
5454 if (!message) break
5555
56+ // dequqe message
5657 message.fromPort.messages.shift()
57- // if the message we recived had more ticks then we currently have the
58- // update it
58+ // if the message we recived had more ticks then we currently have the
59+ // update it
5960 if (message._fromTicks > this.ticks) {
6061 this.ticks = message._fromTicks
6162 this.hypervisor.scheduler.update(this)
6263 }
@@ -80,9 +81,8 @@
8081 const responsePort = message.responsePort
8182 delete message.responsePort
8283
8384 this.ports.addReceivedPorts(message)
84- message._hops++
8585
8686 if (message.constructor === DeleteMessage) {
8787 this.ports._delete(message.fromName)
8888 } else {
@@ -163,8 +163,9 @@
163163 * @param {Object} portRef - the port
164164 * @param {Message} message - the message
165165 */
166166 async send (port, message) {
167+ message._hops++
167168 // set the port that the message came from
168169 message._fromTicks = this.ticks
169170 this.ports.removeSentPorts(message)
170171

Built with git-ssb-web