Changeset 4924 for source/ariba/utility


Ignore:
Timestamp:
Jul 15, 2009, 8:22:38 AM (15 years ago)
Author:
huebsch
Message:

-bootstrap und ablauf

Location:
source/ariba/utility/bootstrap/modules/periodicbroadcast
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp

    r4920 r4924  
    6767        server(io_service, &newRemoteServices, &newRemoteServicesMutex) {
    6868
    69         io_service.run();
     69        io_service_thread = new boost::thread(
     70                boost::bind(&PeriodicBroadcast::threadFunc, this) );
    7071}
    7172
    7273PeriodicBroadcast::~PeriodicBroadcast(){
    7374        io_service.stop();
     75        io_service_thread->join();
     76        delete io_service_thread;
     77        io_service_thread = NULL;
     78}
     79
     80void PeriodicBroadcast::threadFunc(PeriodicBroadcast* obj){
     81        obj->io_service.run();
    7482}
    7583
  • source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h

    r4921 r4924  
    113113
    114114        boost::asio::io_service io_service;
     115        boost::thread* io_service_thread;
     116        static void threadFunc(PeriodicBroadcast* obj);
    115117
    116118        class udp_server {
Note: See TracChangeset for help on using the changeset viewer.