Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2005-09-04 07:10:26

I tried modified the timer1.cpp a little:

#include <iostream>
#include <asio.hpp>

asio::demuxer d;

int main()
    asio::deadline_timer t(d, boost::posix_time::seconds(5));

    std::cout << "Hello, world!\n";

    return 0;

by moving the demuxer object to global scope.
I have to be honest, I am not through with the documentation yet,
but also I did not find a bold mark which prohibits such

At least the program seems to never end, it seems to hang somewhere
in the library clean up code? I can see it waiting for a thread to stop:
// Wait for the thread to exit.
  void join()
    ::WaitForSingleObject(thread_, INFINITE);

But this never happens.

Is it true indeed, that demuxer s must not be at global scope?


Boost list run by bdawes at, gregod at, cpdaniel at, john at