17 #ifndef __TBB_task_scheduler_init_H 18 #define __TBB_task_scheduler_init_H 22 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 54 propagation_mode_exact = 1u,
55 propagation_mode_captured = 2u,
56 propagation_mode_mask = propagation_mode_exact | propagation_mode_captured
62 bool internal_terminate(
bool blocking );
63 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 69 static const int automatic = -1;
72 static const int deferred = -2;
95 #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 96 #if TBB_USE_EXCEPTIONS 97 void blocking_terminate() {
99 internal_blocking_terminate(
true );
102 bool blocking_terminate(
const std::nothrow_t&)
__TBB_NOEXCEPT(
true) {
104 return internal_blocking_terminate(
false );
106 #endif // __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 109 task_scheduler_init(
int number_of_threads=automatic, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL)
118 __TBB_ASSERT( !(thread_stack_size & propagation_mode_mask),
"Requested stack size is not aligned" );
119 #if TBB_USE_EXCEPTIONS 122 initialize( number_of_threads, thread_stack_size );
Class delimiting the scope of task scheduler activity.
#define __TBB_EXPORTED_METHOD
void poison_pointer(T *__TBB_atomic &)
#define __TBB_EXPORTED_FUNC
bool is_active() const
Returns true if scheduler is active (initialized); false otherwise.
~task_scheduler_init()
Destroy scheduler for this thread if thread has no other live task_scheduler_inits.
#define __TBB_NOEXCEPT(expression)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
#define TBB_USE_CAPTURED_EXCEPTION
internal::scheduler * my_scheduler
task_scheduler_init(int number_of_threads=automatic, stack_size_type thread_stack_size=0)
Shorthand for default constructor followed by call to initialize(number_of_threads).
std::size_t stack_size_type