Ignore:
Timestamp:
09/19/22 10:38:09 (21 months ago)
Author:
ymipsl
Message:

Add the possibility to launch a service on same ressource than an other.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/manager/services.cpp

    r2287 r2404  
    1010{ 
    1111  CService::CService(MPI_Comm serviceComm, const std::string& poolId, const std::string& serviceId, const int& partitionId,  
    12                      int type, int nbPartitions) : finalizeSignal_(false), eventScheduler_(nullptr), poolId_(poolId), serviceId_(serviceId), 
    13                                                    partitionId_(partitionId), type_(type), nbPartitions_(nbPartitions), hasNotification_(false) 
     12                     int type, int nbPartitions, shared_ptr<CEventScheduler> eventScheduler)  
     13                         : finalizeSignal_(false), eventScheduler_(nullptr), poolId_(poolId), serviceId_(serviceId), 
     14                           partitionId_(partitionId), type_(type), nbPartitions_(nbPartitions), hasNotification_(false) 
    1415 
    1516 
     
    3637      CXios::getServicesManager()->registerService(poolId, serviceId, partitionId, type, commSize, nbPartitions, globalLeader_) ; 
    3738    } 
    38     eventScheduler_ = new CEventScheduler(serviceComm_) ; 
     39    if (eventScheduler) eventScheduler_ = eventScheduler ; 
     40    eventScheduler_ = make_shared<CEventScheduler>(serviceComm_) ; 
    3941 
    4042    ostringstream oss; 
     
    4547  CService::~CService() 
    4648  { 
    47     delete eventScheduler_ ; 
    4849    delete winNotify_ ; 
    4950    for(auto& it : contexts_) delete it.second ; 
     
    262263  } 
    263264 
    264   CEventScheduler* CService::getEventScheduler(void) 
     265  shared_ptr<CEventScheduler> CService::getEventScheduler(void) 
    265266  { 
    266267    return eventScheduler_ ; 
Note: See TracChangeset for help on using the changeset viewer.