Skip to content

Commit

Permalink
rr doesnt need the additional members
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Sep 5, 2023
1 parent be8983e commit 5d58704
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ThroatQueueFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const NextTickPromise = Q()

function ThroatQueueFunction(n = 5){
const running = []

async function race(cancellationState, running){
const deferred = Q.defer()
cancellationState.deferredWrap(deferred)
Expand Down Expand Up @@ -49,10 +50,9 @@ function ThroatQueueFunction(n = 5){
const r = rFn()
const d = Q.defer()
const dTrack = Q.defer()
const rr = d.promise
dTrack.promise.id = rr.id = idObj
dTrack.promise.fn = rr.fn = what
dTrack.promise.cancel = rr.cancel = ()=>{
dTrack.promise.id = idObj
dTrack.promise.fn = what
dTrack.promise.cancel = ()=>{
cancellationState.cancel()
}
running.push(dTrack.promise)
Expand Down

0 comments on commit 5d58704

Please sign in to comment.