Dear Marc,
I dont see the relation between ev::dynamic_loop and the .once function,
as it is a function of loop_ref. Of course, I could write ev::default_loop
as well, as I've attached.
Kojedzinszky Richard
On Sun, 17 Apr 2011, Marc Lehmann wrote:
On Fri, Apr 15, 2011 at 10:12:20AM +0200, Richard Kojedzinszky
<[email protected]> wrote:
I am suggesting the attached patch to be applied, as the following
short code does not compile:
That code relies on undocumented behaviour though (ev::dynamic_loop) - if
you stick to the documented api it should work.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
#include <ev++.h>
#include <iostream>
class A {
public:
void cb(int x) {
std::cerr << "A::cb()" << std::endl;
}
};
int main()
{
ev::default_loop l;
A a;
l.once<A, &A::cb>(-1, 0, 0, &a);
l.loop();
return 0;
}
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev