How does promise and queue work?



How does promise and queue work?..

Answer / Reema

A Promise in Node.js represents a value that may not be available yet but will be resolved at some point in the future. It returns a single value, either a resolved value or a reason why it's rejected. A Queue, on the other hand, is a collection of waiting tasks to be executed in a specific order. In Node.js, child_process.Queue can be used for asynchronous job processing where each job runs in its own process.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

What is the use of DNS module in Node.js?

1 Answers  


What is package.json file in node project?

1 Answers  


What are local installations of dependencies?

1 Answers  


Explain the role of repl in node.js?

1 Answers  


What is an event loop in node.js and how does it work?

1 Answers  


What is blocking and nonblocking API in Node.js and how does it affect the architecture of your applications?

1 Answers  


How to get post data in node.js?

1 Answers  


What is difference between put and patch?

1 Answers  


Can we use node.js for frontend?

1 Answers  


What are streams? List types of streams available in node js?

1 Answers  


What is a node process?

1 Answers  


Is nodejs easy?

1 Answers  


Categories