Linked Questions

0 votes
2 answers
2k views

Promise.all is run concurrently or in parallel [duplicate]

As far as I know, NodeJS doesn't run promises in parallel, it runs them concurrently as it is a single threaded event loop architecture. Ability to run things in parallel by creating a new child ...
shady's user avatar
  • 11
0 votes
0 answers
94 views

What is the difference between concurrency and multithreading? (especially in Java) [duplicate]

Is concurrency just a broader term and multithreading is one of types of concurrency ?
NonameJavaNoob's user avatar
1682 votes
43 answers
441k views

What is the difference between concurrency and parallelism?

What is the difference between concurrency and parallelism?
StackUnderflow's user avatar
542 votes
15 answers
827k views

How do I parallelize a simple Python loop?

This is probably a trivial question, but how do I parallelize the following loop in python? # setup output lists output1 = list() output2 = list() output3 = list() for j in range(0, 10): # calc ...
memyself's user avatar
  • 12.8k
496 votes
17 answers
180k views

asynchronous and non-blocking calls? also between blocking and synchronous

What is the difference between asynchronous and non-blocking calls? Also between blocking and synchronous calls (with examples please)?
user331561's user avatar
  • 5,051
79 votes
7 answers
38k views

Coordinating parallel execution in node.js

The event-driven programming model of node.js makes it somewhat tricky to coordinate the program flow. Simple sequential execution gets turned into nested callbacks, which is easy enough (though a ...
Thilo's user avatar
  • 264k
69 votes
2 answers
43k views

How can I perform parallel asynchronous HTTP GET requests with reqwest?

The async example is useful, but being new to Rust and Tokio, I am struggling to work out how to do N requests at once, using URLs from a vector, and creating an iterator of the response HTML for each ...
user964375's user avatar
  • 2,471
42 votes
5 answers
21k views

Python 3: send method of generators

I can't understand the send method. I understand that it is used to operate the generator. But the syntax is here: generator.send(value). I somehow can't catch why the value should become the result ...
Kifsif's user avatar
  • 3,893
35 votes
8 answers
21k views

Is there a difference between concurrency and parallelism in java?

I have been doing some research in Google and cant quite get my head around the differences (if any) between concurrent and parallel programs in java. Some of the information I have looked at suggests ...
user1877082's user avatar
36 votes
4 answers
9k views

What's the advantage of a Java-5 ThreadPoolExecutor over a Java-7 ForkJoinPool?

Java 5 has introduced support for asynchronous task execution by a thread pool in the form of the Executor framework, whose heart is the thread pool implemented by java.util.concurrent....
Holger Peine's user avatar
  • 1,209
35 votes
2 answers
27k views

Multiprocessing : More processes than cpu.count

Note: I "forayed" into the land of multiprocessing 2 days ago. So my understanding is very basic. I am writing and application for uploads to amazon s3 buckets. In case the file size is larger(100mb),...
letsc's user avatar
  • 2,577
14 votes
6 answers
34k views

Python Using Multiprocessing

I am trying to use multiprocessing in python 3.6. I have a for loopthat runs a method with different arguments. Currently, it is running one at a time which is taking quite a bit of time so I am ...
anderish's user avatar
  • 1,779
12 votes
8 answers
2k views

IoT request response protocol

We need to build a server that can communicate with some embedded devices running a variant of Android. We need to be able to send commands to the device, and receive a response. A simple command ...
Dominic Bou-Samra's user avatar
15 votes
3 answers
2k views

What do the different (HotSpot) JVM thread types do?

I see there are six thread types implemented into the HotSpot JVM: VMThread, CGCThread, PGCThread, JavaThread, CompilerThread and WatcherThread. However I don't know which thread type is doing what ...
Florian Richoux's user avatar
7 votes
3 answers
3k views

Confusion regarding the Blocking of "peer threads" when a user-level thread blocks

I was reading about differences between threads and processes, and literally everywhere online, one difference is commonly written without much explanation: If a process gets blocked, remaining ...
AMAN KUMAR's user avatar

15 30 50 per page