added comments to most of the classes.

This commit is contained in:
Kevin Jahns
2015-09-17 00:21:01 +02:00
parent 6f3a291ef5
commit b1d70ef25e
16 changed files with 448 additions and 282 deletions

View File

@@ -83,26 +83,26 @@ class Test extends Y.AbstractConnector {
}
}
flushAll () {
var def = Promise.defer()
// flushes may result in more created operations,
// flush until there is nothing more to flush
function nextFlush () {
var c = flushOne()
if (c) {
while (flushOne()) {
// nop
return new Promise(function (resolve) {
// flushes may result in more created operations,
// flush until there is nothing more to flush
function nextFlush () {
var c = flushOne()
if (c) {
while (flushOne()) {
// nop
}
wait().then(nextFlush)
} else {
wait().then(function () {
resolve()
})
}
wait().then(nextFlush)
} else {
wait().then(function () {
def.resolve()
})
}
}
// in the case that there are
// still actions that want to be performed
wait(0).then(nextFlush)
return def.promise
// in the case that there are
// still actions that want to be performed
wait(0).then(nextFlush)
})
}
flushOne () {
flushOne()