Yes, we have been after marrying the parallelism and concurrency primitives in 
Nim for a while now. You can see some efforts for this being made in 
[https://github.com/nim-lang/Nim/pull/11724](https://github.com/nim-lang/Nim/pull/11724),
 but it didn't get to a point where it could be merged. The ideal is to be able 
to `await` a `recv` on a channel and a `FlowVar`, but right now you indeed need 
to busy loop waiting for the data which is enormously inefficient.

As far as your use case though, if it is a HTTP server then you may wish to 
consider following the model that httpbeast takes: an async event loop per 
thread. That way you can get Linux/BSD to send each thread requests evenly and 
keep all of them busy.

Reply via email to