Closed Bug 1561668 Opened 7 years ago Closed 6 years ago

Find a simple way to serialize an async function

Categories

(Taskcluster :: Services, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin, Mentored)

Details

Assignee: dustin → nobody
Mentor: dustin
Assignee: nobody → dustin

It looks like https://github.com/sindresorhus/p-limit is the tool for this. And we already require it indirectly!

=> Found "p-limit@2.2.1"
info Reasons this module exists
   - "_project_#find-up#locate-path#p-locate" depends on it
   - Hoisted from "_project_#find-up#locate-path#p-locate#p-limit"
   - Hoisted from "_project_#c8#find-up#locate-path#p-locate#p-limit"
   - Hoisted from "_project_#c8#yargs#find-up#locate-path#p-locate#p-limit"

Hm, but that doesn't let you wait until all pending calls are complete.

https://github.com/sindresorhus/p-limit/pull/26

I wrote https://github.com/djmitche/p-sync - let's see what sindresorhus thinks.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.