I assume, the other threads do some IO or some calculation, and then they want to signal mongoose "hey, I've got some data ready for you, please send it to the client".
In this case, mongoose handlers will be triggered on each mg_poll_server() iteration (let's call it MG_POLL event). The only problem needs to be solved is to wake up currently running mg_poll_server() which might be blocked on select() syscall. I plan to add a new call, mg_wakeup_server(), which will break up currently sleeping mg_poll_server(), and let it do another iteration, calling all handlers with MG_POLL event. Technically, I'll do it by sending 1 byte into the socketpair, and let mg_poll_server() add a listening end of the socket pair to the select(). Then, any thread that calls mg_wakeup_server() (by writing a byte into a socketpair) can wake up a sleeping server. Does that sound reasonable? ​Sergey. -- You received this message because you are subscribed to the Google Groups "mongoose-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/groups/opt_out.
