MCPcopy Create free account
hub / github.com/d3/d3-queue / task

Function task

test/deferredSynchronousTask.js:6–13  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

4 if (!counter) counter = {scheduled: 0};
5
6 function task(callback) {
7 if (deferrals) return deferrals.push({callback: callback, index: counter.scheduled++});
8 try {
9 callback(null, {active: ++active, index: counter.scheduled++});
10 } finally {
11 --active;
12 }
13 }
14
15 task.finish = function() {
16 var deferrals_ = deferrals.slice();

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…