Move `std::rt::start_on_main_thread` call into separate function in examples