[core] Remove RunLoop::{ref,unref}

This commit is contained in:
John Firebaugh
2016-02-15 16:36:56 -08:00
parent 5ca625ba0d
commit d66d145c6e
3 changed files with 1 additions and 72 deletions

View File

@@ -29,47 +29,3 @@ TEST(RunLoop, MultipleStop) {
loop.run();
}
TEST(RunLoop, UnrefShouldStop) {
RunLoop loop(RunLoop::Type::New);
Timer timer;
timer.start(mbgl::Duration::zero(), mbgl::Duration::zero(), [&] {
loop.unref();
});
loop.run();
}
TEST(RunLoop, RefUnref) {
RunLoop loop(RunLoop::Type::New);
Timer timer;
auto zero = mbgl::Duration::zero();
auto cb3 = [&] {
loop.stop();
};
auto cb2 = [&] {
loop.unref();
loop.unref();
loop.ref();
timer.start(zero, zero, cb3);
};
auto cb1 = [&] {
loop.ref();
loop.ref();
loop.unref();
timer.start(zero, zero, cb2);
};
timer.start(zero, zero, cb1);
loop.run();
}