src/benchmark/context.cpp
// Switches to the current context.
Switches to the current context.
Switches to the current context .
static void context_verify(benchmark::State& state) noexcept
{
  ice::context c0;
  auto co = [&]() -> ice::sync<void> {
    for (auto _ : state) {
      co_await ice::schedule(c0);
    }
    c0.stop();
  }();
  if (const auto ec = ice::set_thread_affinity(0)) {
    state.SkipWithError(ec.message().data());
  }
  c0.run();
  co.get();
}
static void context_verify ( benchmark :: State & state ) noexcept { ice :: context c0 ; auto co = [ & ] ( ) -> ice :: sync < void > { for ( auto _ : state ) { co_await ice :: schedule ( c0 ) ; } c0 . stop ( ) ; } ( ) ; if ( const auto ec = ice :: set_thread_affinity ( 0 ) ) { state . SkipWithError ( ec . message ( ) . data ( ) ) ; } c0 . run ( ) ; co . get ( ) ; }
Switches to the current context.
Switches to the current context .