fix transaction wait bug
This commit is contained in:
parent
aa2e7fd917
commit
940a44bb7c
@ -341,8 +341,12 @@ module.exports = function (Y) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
requestTransaction (makeGen, callImmediately) {
|
requestTransaction (makeGen, callImmediately) {
|
||||||
if (callImmediately) {
|
if (callImmediately || true) {
|
||||||
this.transact(makeGen)
|
this.waitingTransactions.push(makeGen)
|
||||||
|
if (!this.transactionInProgress) {
|
||||||
|
this.transactionInProgress = true
|
||||||
|
this.transact(this.getNextRequest())
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.waitingTransactions.push(makeGen)
|
this.waitingTransactions.push(makeGen)
|
||||||
if (!this.transactionInProgress) {
|
if (!this.transactionInProgress) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
var Y = require('../SpecHelper.js')
|
var Y = require('../SpecHelper.js')
|
||||||
var numberOfYMapTests = 100
|
var numberOfYMapTests = 500
|
||||||
var repeatMapTeasts = 1
|
var repeatMapTeasts = 1
|
||||||
|
|
||||||
for (let database of databases) {
|
for (let database of databases) {
|
||||||
|
4
src/y.js
4
src/y.js
@ -85,7 +85,9 @@ class YConfig {
|
|||||||
yield* this.store.tryExecute.call(this, model)
|
yield* this.store.tryExecute.call(this, model)
|
||||||
var root = yield* this.getType(model.id)
|
var root = yield* this.getType(model.id)
|
||||||
this.store.y.root = root
|
this.store.y.root = root
|
||||||
callback()
|
setTimeout(function () {
|
||||||
|
callback()
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
isConnected () {
|
isConnected () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user