Skip to content

Commit

Permalink
Removed straggling console.log statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
T99 committed Sep 10, 2021
1 parent 3572084 commit cea1892
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ts/semaphore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,18 @@ export class Semaphore {

}

console.log(`a`);

let lockID: string;

// Generate a unique ID for the new lock.
do lockID = crypto.randomBytes(16).toString("hex");
while (this.outstandingLocks.hasOwnProperty(lockID));

console.log(`b`);

// Add the new lock to the internal map of locks.
this.outstandingLocks[lockID] = new SemaphoreLock(lockID);

console.log(`c`);

// Make the lock delete itself once it is relinquished.
this.outstandingLocks[lockID].then((): boolean => delete this.outstandingLocks[lockID]);

console.log(`d`);

return this.outstandingLocks[lockID];

}
Expand Down

0 comments on commit cea1892

Please sign in to comment.