36TEST(rpc, server_bind_sync_run_on_game_thread) {
38 const auto main_thread_id = std::this_thread::get_id();
44 server.BindSync(
"do_the_thing", [=](
int x,
int y) ->
int {
45 EXPECT_EQ(std::this_thread::get_id(), main_thread_id);
51 std::atomic_bool done{
false};
59 for (
auto i = 0; i < 300; ++i) {
61 auto result =
client.call(
"do_the_thing", i, 1).as<
int>();
62 EXPECT_EQ(result, i + 1);
70 for (; i < 1'000'000u; ++i) {
72 server.SyncRunFor(2ms);
79 std::cout <<
"game thread: run " << i <<
" slices.\n";