Changeset 2525


Ignore:
Timestamp:
06/27/23 11:08:52 (12 months ago)
Author:
jderouillat
Message:

Use a list<CRequest*> in the one-sided protocol to handle safely the nonblocking communication associated to CRequest

Location:
XIOS3/branches/xios-3.0-beta/src/transport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/branches/xios-3.0-beta/src/transport/one_sided_context_server.cpp

    r2524 r2525  
    102102      if (flag==true) 
    103103      { 
    104         requests_.push_back(CRequest(interCommMerged_, status)) ; 
    105         if (requests_.back().test())  
     104        requests_.push_back(new CRequest(interCommMerged_, status)) ; 
     105        if (requests_.back()->test())  
    106106        { 
    107           processRequest(requests_.back()) ; 
     107          processRequest(*(requests_.back())) ; 
     108          delete requests_.back(); 
    108109          requests_.pop_back() ; 
    109110        } 
     
    117118    while (it != requests_.end()) 
    118119    { 
    119       if (it->test()) 
    120       { 
    121         processRequest(*it) ; 
     120      if ((*it)->test()) 
     121      { 
     122        processRequest(*(*it)) ; 
     123        delete (*it); 
    122124        auto it2=it ; 
    123125        ++it ; 
  • XIOS3/branches/xios-3.0-beta/src/transport/one_sided_context_server.hpp

    r2343 r2525  
    106106      MPI_Request processEventRequest_ ; 
    107107 
    108       std::list<CRequest> requests_ ; 
     108      std::list<CRequest*> requests_ ; 
    109109 
    110110      std::map<size_t, SPendingEvent> pendingEvents_   ; 
Note: See TracChangeset for help on using the changeset viewer.