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

Method internal_enqueue

benchmarks/tbb/arena.cpp:675–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675void task_arena_base::internal_enqueue( task& t, intptr_t prio ) const {
676 __TBB_ASSERT(my_arena, NULL);
677 generic_scheduler* s = governor::local_scheduler_if_initialized();
678 __TBB_ASSERT(s, "Scheduler is not initialized"); // we allocated a task so can expect the scheduler
679#if __TBB_TASK_GROUP_CONTEXT
680 __TBB_ASSERT(my_arena->my_default_ctx == t.prefix().context, NULL);
681 __TBB_ASSERT(!my_arena->my_default_ctx->is_group_execution_cancelled(), // TODO: any better idea?
682 "The task will not be executed because default task_group_context of task_arena is cancelled. Has previously enqueued task thrown an exception?");
683#endif
684 my_arena->enqueue_task( t, prio, s->my_random );
685}
686
687class delegated_task : public task {
688 internal::delegate_base & my_delegate;

Callers

nothing calls this directly

Calls 2

enqueue_taskMethod · 0.80

Tested by

no test coverage detected