> I'll have to look through your epoll setup!

I ended up having success with Nim's 
[std/selectors](https://nim-lang.org/docs/selectors.html) package so the main 
socket IO loop uses that. I am happy this low-level library was available.

> What are you using to send data between the IO thread and workers?

There's only 2 memory-thread transition points: requests from IO thread -> 
worker threads and responses from worker threads -> IO thread. This is also 
true for WebSocket messages.

For incoming requests I'm manually managing the memory since I want the Request 
object to be many-thread-safe to enable even further use of threading (fanning 
out in an incoming request onto a few more worker threads to do some stuff in 
parallel before responding). That's only something I have running locally, not 
shown in the repo right now.

As for responses from workers -> IO thread, that's an ownership transfer `move` 
into a queue + Atomic-as-lock. Same idea as a channel but I had very simple 
needs so I just kept it simple.

Reply via email to