MCPcopy Create free account
hub / github.com/Yaffle/EventSource / process

Function process

tests/qunit.js:1007–1026  ·  view source on GitHub ↗
( last )

Source from the content-addressed store, hash-verified

1005}
1006
1007function process( last ) {
1008 function next() {
1009 process( last );
1010 }
1011 var start = new Date().getTime();
1012 config.depth = config.depth ? config.depth + 1 : 1;
1013
1014 while ( config.queue.length && !config.blocking ) {
1015 if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
1016 config.queue.shift()();
1017 } else {
1018 setTimeout( next, 13 );
1019 break;
1020 }
1021 }
1022 config.depth--;
1023 if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
1024 done();
1025 }
1026}
1027
1028function saveGlobal() {
1029 config.pollution = [];

Callers 3

qunit.jsFile · 0.85
synchronizeFunction · 0.85
nextFunction · 0.85

Calls 1

doneFunction · 0.85

Tested by

no test coverage detected