Ignore:
Timestamp:
12/13/17 16:11:58 (6 years ago)
Author:
ymipsl
Message:

Attemping to solve a dead-lock rising at finalize :
Server 1 must be able receive buffer of on other context (ie from server2) when awaiting free buffer.
To be tested extensively...

YM


File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp

    r1372 r1378  
    396396 
    397397   //! Try to send the buffers and receive possible answers 
    398   bool CContext::checkBuffersAndListen(void) 
     398  bool CContext::checkBuffersAndListen(bool enableEventsProcessing /*= true*/) 
    399399  { 
    400400    bool clientReady, serverFinished; 
     
    408408        hasTmpBufferedEvent = !client->sendTemporarilyBufferedEvent(); 
    409409      // Don't process events if there is a temporarily buffered event 
    410       return server->eventLoop(!hasTmpBufferedEvent); 
     410      return server->eventLoop(!hasTmpBufferedEvent || !enableEventsProcessing); 
    411411    } 
    412412    else if (CServer::serverLevel == 1) 
     
    423423          clientPrimServer[i]->checkBuffers(); 
    424424        if (!finalized) 
    425           serverPrimFinished *= serverPrimServer[i]->eventLoop(); 
     425          serverPrimFinished *= serverPrimServer[i]->eventLoop(enableEventsProcessing); 
    426426      } 
    427427      return ( serverFinished && serverPrimFinished); 
     
    431431    { 
    432432      client->checkBuffers(); 
    433       return server->eventLoop(); 
     433      return server->eventLoop(enableEventsProcessing); 
    434434    } 
    435435  } 
     
    490490       { 
    491491         // Blocking send of context finalize message to its client (e.g. primary server or model) 
     492         info(100)<<"DEBUG: context "<<getId()<<" Send client finalize<<"<<endl ; 
    492493         client->finalize(); 
    493494         bool bufferReleased; 
Note: See TracChangeset for help on using the changeset viewer.