Allow alternate API to Dataspace.backgroundTask
This commit is contained in:
parent
9e41d8754c
commit
95f8e881d2
|
@ -113,12 +113,13 @@ Dataspace.backgroundTask = function (k) {
|
|||
let ground = Dataspace._currentFacet.actor.dataspace.container;
|
||||
let active = true;
|
||||
ground.backgroundTaskCount++;
|
||||
return k(() => {
|
||||
function finish() {
|
||||
if (active) {
|
||||
ground.backgroundTaskCount--;
|
||||
active = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
return k ? k(finish) : finish;
|
||||
};
|
||||
|
||||
Dataspace.referenceField = function (obj, prop) {
|
||||
|
|
Loading…
Reference in New Issue