In the NodeJS example, a blocking pop is performed on the response queue so we will know instantly when a response is received. However, this blocking is being done on the connection that is also sending the requests. Therefore, even though the example is using bluebird.map, execution is happening concurrently and the example does not demonstrate decreased execution time when running multiple workers.
In the NodeJS example, a blocking pop is performed on the response queue so we will know instantly when a response is received. However, this blocking is being done on the connection that is also sending the requests. Therefore, even though the example is using
bluebird.map
, execution is happening concurrently and the example does not demonstrate decreased execution time when running multiple workers.