7 eventxx::dispatcher& d;
9 handler(eventxx::dispatcher& d): d(d), i(0) {}
10 void operator() (int signum, short event)
12 if (i < 5) std::cout << "keep going...\n";
15 std::cout << "done!\n";
21 void sighandler(int signum, short event, void* data)
23 int& i = *static_cast< int* >(data);
24 std::cout << ++i << " interrupts, ";
29 eventxx::dispatcher d;
31 eventxx::csignal sigev(SIGINT, sighandler, &h.i);
32 eventxx::signal< handler > e(SIGINT, h);