B
B
bernex2016-09-12 11:11:36
Node.js
bernex, 2016-09-12 11:11:36

Execute queue how to do in node.js?

What is the best way to make a queue:
Pool 1
1. Tasks enter the queue
2. Handler 1 - exe file processes
3. Handler 2 - another exe file processes (step two)
The main thing is that the order does not go astray and step 3 is in the correct order for the queue.
Ideally, do 2 steps in 2 threads (2 parallel launches or 3)
Are there ready-made - convenient packages?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2016-09-12
@SPAHI4

Use Promise:

Promise.all(thread1, thread2).then((result1, result2) => /* step 3*/)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question