improved awaitOps

This commit is contained in:
Kevin Jahns
2016-05-07 13:16:48 +01:00
parent 483d2c78aa
commit 14d59de2bd
3 changed files with 90 additions and 33 deletions

View File

@@ -479,14 +479,9 @@ module.exports = function (Y /* :any */) {
this.waitingTransactions.push(makeGen)
if (!this.transactionInProgress) {
this.transactionInProgress = true
if (false || callImmediately) { // TODO: decide whether this is ok or not..
setTimeout(() => {
this.transact(this.getNextRequest())
} else {
var self = this
setTimeout(function () {
self.transact(self.getNextRequest())
}, 0)
}
}, 0)
}
}
}