index.js
function CheckPendingThreadRequests() {
    while (PendingThreadRequests.length) {
        var tq = PendingThreadRequests.shift();
        if (!SendThreadRequest(tq)) {
            // No available thread, we queue the request, again
            PendingThreadRequests.unshift(tq);
            break;
        }
    }
}
function CheckPendingThreadRequests() {
    while (PendingThreadRequests.length) {
        var tq = PendingThreadRequests.shift();
        if (!SendThreadRequest(tq)) {
            // No available thread, we queue the request, again
            PendingThreadRequests.unshift(tq);
            break;
        }
    }
}
function CheckPendingThreadRequests ( ) { while ( PendingThreadRequests . length ) { var tq = PendingThreadRequests . shift ( ) ; if ( ! SendThreadRequest ( tq ) ) { // No available thread, we queue the request, again PendingThreadRequests . unshift ( tq ) ; break ; } } }
Check if there is a request waiting and execute it on an inactive thread available
Check if there is a request waiting and execute it on an inactive thread available