A
A
Andrew2017-08-23 18:29:15
Node.js
Andrew, 2017-08-23 18:29:15

Does node.js have multithreading?

is there multithreading in node, js, you can create a stream, but as I heard that this is not quite a stream, is it correct to call stream a full-fledged stream? what's the difference between thread and stream?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Shashenkov, 2017-08-23
@teknik2008

You just need to go to the off site and read

D
dummyman, 2017-08-23
@dummyman

stream is a stream of data,
tread is a stream of control structures (operators).
Read almost the same. The difference between them:
stream - information, thread - subroutine (algorithm).
Unfortunately, v8 can only run in one thread.
If you need to increase performance on multiprocessor stations, you can run the algorithm in several processes, while each process will eat its own memory and there is no way to set / use common memory blocks. At the same time, all features are available in the native api nodes - you can program the system-critical code separately on these, compile the module into the node and use it from javascript.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question