now thread module and poller module seem to work correctly in test case,
I integrate these 2 modules, for building multithread network client/server easily.
see test/pulpo.lua, it can easily declare 4 thread server and 2 thread client, work together.
caveats:
pulpo's multithread server implementation rely on SO_REUSEPORT option, which allows multiple threads/processes listen on same port. but at OSX it turns out that only the thread, which open such a listen socket on first, can accept incoming connection. so actually multi-thread server performance is just like single thread server. further investigation is carrying out now.
now thread module and poller module seem to work correctly in test case, I integrate these 2 modules, for building multithread network client/server easily.
see test/pulpo.lua, it can easily declare 4 thread server and 2 thread client, work together.
caveats: pulpo's multithread server implementation rely on SO_REUSEPORT option, which allows multiple threads/processes listen on same port. but at OSX it turns out that only the thread, which open such a listen socket on first, can accept incoming connection. so actually multi-thread server performance is just like single thread server. further investigation is carrying out now.