MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / get_mailbox_task

Method get_mailbox_task

benchmarks/tbb/scheduler.cpp:980–992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

978}
979
980task* generic_scheduler::get_mailbox_task() {
981 __TBB_ASSERT( my_affinity_id>0, "not in arena" );
982 while ( task_proxy* const tp = my_inbox.pop() ) {
983 if ( task* result = tp->extract_task<task_proxy::mailbox_bit>() ) {
984 ITT_NOTIFY( sync_acquired, my_inbox.outbox() );
985 result->prefix().extra_state |= es_task_is_stolen;
986 return result;
987 }
988 // We have exclusive access to the proxy, and can destroy it.
989 free_task<no_cache_small_task>(*tp);
990 }
991 return NULL;
992}
993
994// TODO: Rename to publish_task_pool
995void generic_scheduler::enter_arena() {

Callers

nothing calls this directly

Calls 2

outboxMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected