On Friday, 11 May 2018 at 07:56:04 UTC, Daniel Kozak wrote:
On Wednesday, 9 May 2018 at 22:37:22 UTC, Arun Chandrasekaran wrote:
[...]

I have change my example a little:

case "/": res.writeBody("Hello World " ~ to!string(thisThreadID), "text/plain");

And I get this (siege -p -c15 0b -t 10s http://127.0.0.1:3000 | grep World | sort | uniq):

Hello World 140064214951680
Hello World 140064223344384
Hello World 140064231737088
Hello World 140064240129792
Hello World 140064248522496
Hello World 140064256915200

Si I get six different thread ids, which is OK because I have 6 cores

siege makes a difference. Earlier I had two chrome windows open and I just tried a simple GET from each, with a considerable delay and I saw the same thread ID in both the responses. Thanks for your help! But couldn't understand how two chrome windows could consistently get the same thread ID. netstat shows one ESTABLISHED socket. May be Chrome multiplexes the connection? That doesn't sound right to me.

Reply via email to