Hi Ariel:

  you may try or check how does node.js implement cluster and work_thread 
model.

Best regards
   tom zhou


On Tuesday, July 7, 2020 at 2:12:19 AM UTC-7, Ariel Machado wrote:
>
> Hi Tom,
> In this specific case, it is not about using multi-core CPUs, but about 
> not blocking the main thread with heavy processing tasks, nor passing 
> request / response data for read / write operations between threads.
> In addition, spawn multiple process is not always applicable when what you 
> want it to process a FIFO queue of connections sequentially, deals with a 
> single resource like a DB connection, etc.
> What I need is a lightweight way to pass an handle of an accepted tcp 
> connection between threads, unregistering it from the main loop an 
> registering it in the worker thread loop.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to libuv+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/ff750201-faa2-4482-91e4-614e89032d67o%40googlegroups.com.

Reply via email to