Comment 2 for bug 555873

Revision history for this message
Paco (manuel-arguelles) wrote :

Yes,

I agree. But supposed we have a multi-thread jardin server instance, each connection will be placed on a thread, the user provided callback will be called in multiple threads.

In order for the caller to keep track of this, it has to share a memory area (maybe a hashtable with the recv_context.sfd as key (or the peer info)) to keep data coming from different peers, it also needs to know when the connection ends to remove the entry from the table.

I don't see any problem with blocking a thread... (as long as the block is not for ever), isn't that the whole purpose of using threads?