Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Gras listener thread of each process do select(-1) instead of while(1) {select(0.5)}
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 10 Mar 2009 15:02:34 +0000 (15:02 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 10 Mar 2009 15:02:34 +0000 (15:02 +0000)
So, it won't get active before a message actually arrived.

The previous design was because when the main thread opens a server
socket, it has to be added to the set of sockets select()ed by the
listener. My solution is to add a new socket between main and listener
threads. Each time the main opens a socket, it writes something on
this socket, unlocking the listener. Who detects the fact that it's
not a real message to handle, and get back to select(-1)
(automagically adding the new socket to the set).

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6151 48e7efb5-ca39-0410-a469-dd3cf9ba447f


No differences found