Changeset 4924


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

-bootstrap und ablauf

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sample/pingpong/main.cpp

    r4920 r4924  
    66using ariba::utility::StartupWrapper;
    77using ariba::application::pingpong::PingPong;
    8 
    98
    109//*************************************************
     
    1615        StartupWrapper::startSystem();
    1716
     17        std::cout << "yyyyyyyyy!" << std::endl;
     18
    1819        BootstrapManager& manager = BootstrapManager::instance();
    1920        manager.registerModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
     21
     22        std::cout << "xxxxxxxxxxxxyyyyyyyyy!" << std::endl;
    2023
    2124        manager.publish("testname", "testinfo1", "testinfo2", "testinfo3");
     
    3134int main( int argc, char** argv ) {
    3235
    33         //debug();
    34         //return 0;
     36        debug();
     37        return 0;
    3538
    3639
  • 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.