C++: Fixed sixtyfps::blocking_invoke_from_main_loop when the callable returns void

Fixes #623
This commit is contained in:
Olivier Goffart 2021-11-01 10:46:40 +01:00
parent a102e9ed8d
commit d26e95fb95
3 changed files with 21 additions and 2 deletions

View file

@ -67,9 +67,12 @@ TEST_CASE("Blocking Event from thread")
return std::make_unique<int>(42);
});
called = *foo;
sixtyfps::invoke_from_event_loop([&] {
int xxx = 123;
sixtyfps::blocking_invoke_from_event_loop([&] {
sixtyfps::quit_event_loop();
xxx = 888999;
});
REQUIRE(xxx == 888999);
});
sixtyfps::run_event_loop();