Ignore:
Timestamp:
01/24/17 16:15:50 (4 years ago)
Author:
rlacroix
Message:

Make the XIOS server(s) completely non-blocking.

This fixes some deadlocks caused by bugs in the communication protocol when using inputs and multiple contexts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r1028 r1033  
    339339   } 
    340340 
    341    //! Server side: Put server into a loop in order to listen message from client 
    342    bool CContext::eventLoop(void) 
    343    { 
    344      return server->eventLoop(); 
    345    } 
    346  
    347341   //! Try to send the buffers and receive possible answers 
    348342   bool CContext::checkBuffersAndListen(void) 
    349343   { 
    350344     client->checkBuffers(); 
    351      return server->eventLoop(); 
     345 
     346     bool hasTmpBufferedEvent = client->hasTemporarilyBufferedEvent(); 
     347     if (hasTmpBufferedEvent) 
     348       hasTmpBufferedEvent = !client->sendTemporarilyBufferedEvent(); 
     349 
     350     // Don't process events if there is a temporarily buffered event 
     351     return server->eventLoop(!hasTmpBufferedEvent); 
    352352   } 
    353353 
Note: See TracChangeset for help on using the changeset viewer.