Skip to content

Instantly share code, notes, and snippets.

@exhesham
Created December 12, 2021 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exhesham/674c5fe0257cebd81f0ec056963b2aee to your computer and use it in GitHub Desktop.
Save exhesham/674c5fe0257cebd81f0ec056963b2aee to your computer and use it in GitHub Desktop.
sol2-configtasks.ts
let idx =1, tasksQueue = Array(numberOfTasks).fill(1)
.map(v => Math.round(Math.random() * 30) + v)
.map(v => (() => taskExecutor({delay: v, index: `${idx++}` })));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment