Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
tbb::internal::tbb_thread_v3 Class Reference

Versioned thread class. More...

#include <tbb_thread.h>

Classes

class  id
 

Public Types

typedef HANDLE native_handle_type
 
typedef pthread_t native_handle_type
 

Public Member Functions

 tbb_thread_v3 ()
 Constructs a thread object that does not represent a thread of execution.
 
template<class F >
 tbb_thread_v3 (F f)
 Constructs an object and executes f() in a new thread.
 
template<class F , class X >
 tbb_thread_v3 (F f, X x)
 Constructs an object and executes f(x) in a new thread.
 
template<class F , class X , class Y >
 tbb_thread_v3 (F f, X x, Y y)
 Constructs an object and executes f(x,y) in a new thread.
 
tbb_thread_v3operator= (tbb_thread_v3 &x)
 
void swap (tbb_thread_v3 &t)
 
bool joinable () const
 
void __TBB_EXPORTED_METHOD join ()
 The completion of the thread represented by *this happens before join() returns.
 
void __TBB_EXPORTED_METHOD detach ()
 When detach() returns, *this no longer represents the possibly continuing thread of execution.
 
id get_id () const
 
native_handle_type native_handle ()
 

Static Public Member Functions

static unsigned __TBB_EXPORTED_FUNC hardware_concurrency ()
 The number of hardware thread contexts. More...
 

Friends

void __TBB_EXPORTED_FUNC move_v3 (tbb_thread_v3 &t1, tbb_thread_v3 &t2)
 
void tbb::swap (tbb_thread_v3 &t1, tbb_thread_v3 &t2)
 

Detailed Description

Versioned thread class.

Member Function Documentation

static unsigned __TBB_EXPORTED_FUNC tbb::internal::tbb_thread_v3::hardware_concurrency ( )
static

The number of hardware thread contexts.

Before TBB 3.0 U4 this methods returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask.

NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool.


The documentation for this class was generated from the following file:

Copyright © 2005-2014 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.