Hello, I'm playing with the sample code uv_webserver<https://github.com/GHamrouni/uv_webserver>released by Ryan Dahl and I want to add thread support for incoming connection.
To make it short I'm just trying to thread the on_connect after uv_listento make sure that all the tcp connections will be distributed over all the cpus available on my computer. After my naive attempt of creating a thread and new loop and try to use uv_accept I found those lines of code in unix/stream.c (line: 218-219): /* TODO document this */ assert(server->loop == client->loop); I read the src code and I understand the dependency (mainly around loop) between the server and the client so I wanted to know if there is a workaround ? BTW I thought that maybe I could use memcpy on uv_stream_t and assign the new loop to server variable, but I have no idea if the struct will be correctly copied and if it won't introduce more problems. Do you know if there is a method to copy and move uv_stream_t between loops properly? Thanks, Mathieu -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
