Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Public Member Functions | |
private_server (tbb_client &client) | |
version_type | version () const __TBB_override |
void | request_close_connection (bool) __TBB_override |
void | yield () __TBB_override |
void | independent_thread_number_changed (int) __TBB_override |
unsigned | default_concurrency () const __TBB_override |
void | adjust_job_count_estimate (int delta) __TBB_override |
Private Types | |
typedef scheduler_mutex_type | asleep_list_mutex_type |
Protects my_asleep_list_root. More... | |
Private Member Functions | |
void | propagate_chain_reaction () |
Wake up to two sleeping workers, if there are any sleeping. More... | |
bool | try_insert_in_asleep_list (private_worker &t) |
Try to add t to list of sleeping workers. More... | |
void | wake_some (int additional_slack) |
Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits. More... | |
virtual | ~private_server () |
void | remove_server_ref () |
![]() | |
no_copy (const no_copy &)=delete | |
no_copy ()=default | |
Private Attributes | |
tbb_client & | my_client |
const tbb_client::size_type | my_n_thread |
Maximum number of threads to be created. More... | |
const size_t | my_stack_size |
Stack size for each thread. */. More... | |
atomic< int > | my_slack |
Number of jobs that could use their associated thread minus number of active threads. More... | |
atomic< int > | my_ref_count |
Counter used to determine when to delete this. More... | |
padded_private_worker * | my_thread_array |
tbb::atomic< private_worker * > | my_asleep_list_root |
List of workers that are asleep or committed to sleeping until notified by another thread. More... | |
asleep_list_mutex_type | my_asleep_list_mutex |
Friends | |
class | private_worker |
Definition at line 118 of file private_server.cpp.
Protects my_asleep_list_root.
Definition at line 144 of file private_server.cpp.
|
privatevirtual |
Definition at line 339 of file private_server.cpp.
References __TBB_ASSERT, tbb::cache_aligned_allocator< T >::deallocate(), my_n_thread, my_thread_array, and tbb::internal::poison_pointer().
Referenced by remove_server_ref().
tbb::internal::rml::private_server::private_server | ( | tbb_client & | client | ) |
Definition at line 319 of file private_server.cpp.
References tbb::cache_aligned_allocator< T >::allocate(), my_asleep_list_root, my_n_thread, tbb::internal::rml::private_worker::my_next, my_ref_count, my_slack, and my_thread_array.
Definition at line 399 of file private_server.cpp.
References my_slack, and wake_some().
|
inline |
Definition at line 194 of file private_server.cpp.
References tbb::internal::governor::default_num_threads().
Definition at line 192 of file private_server.cpp.
References __TBB_ASSERT.
|
inlineprivate |
Wake up to two sleeping workers, if there are any sleeping.
The call is used to propagate a chain reaction where each thread wakes up two threads, which in turn each wake up two threads, etc.
Definition at line 154 of file private_server.cpp.
References my_asleep_list_root, and wake_some().
Referenced by tbb::internal::rml::private_worker::run().
|
inlineprivate |
Definition at line 168 of file private_server.cpp.
References tbb::cache_aligned_allocator< T >::deallocate(), my_client, my_ref_count, and ~private_server().
Referenced by request_close_connection(), tbb::internal::rml::private_worker::run(), and tbb::internal::rml::private_worker::start_shutdown().
|
inline |
Definition at line 184 of file private_server.cpp.
References my_n_thread, my_thread_array, and remove_server_ref().
|
inlineprivate |
Try to add t to list of sleeping workers.
Definition at line 347 of file private_server.cpp.
References lock, my_asleep_list_mutex, my_asleep_list_root, tbb::internal::rml::private_worker::my_next, and my_slack.
Referenced by tbb::internal::rml::private_worker::run().
|
inline |
Definition at line 180 of file private_server.cpp.
Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits.
Definition at line 364 of file private_server.cpp.
References __TBB_ASSERT, lock, my_asleep_list_mutex, my_asleep_list_root, tbb::internal::rml::private_worker::my_next, my_slack, and tbb::internal::rml::private_worker::wake_or_launch().
Referenced by adjust_job_count_estimate(), and propagate_chain_reaction().
|
inline |
|
friend |
Definition at line 176 of file private_server.cpp.
|
private |
Definition at line 145 of file private_server.cpp.
Referenced by try_insert_in_asleep_list(), and wake_some().
|
private |
List of workers that are asleep or committed to sleeping until notified by another thread.
Definition at line 141 of file private_server.cpp.
Referenced by private_server(), propagate_chain_reaction(), try_insert_in_asleep_list(), and wake_some().
|
private |
Definition at line 120 of file private_server.cpp.
Referenced by remove_server_ref().
|
private |
Maximum number of threads to be created.
Threads are created lazily, so maximum might not actually be reached.
Definition at line 123 of file private_server.cpp.
Referenced by private_server(), request_close_connection(), and ~private_server().
|
private |
Counter used to determine when to delete this.
Definition at line 136 of file private_server.cpp.
Referenced by private_server(), and remove_server_ref().
|
private |
Number of jobs that could use their associated thread minus number of active threads.
If negative, indicates oversubscription. If positive, indicates that more threads should run. Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex, because raising it impacts the invariant for sleeping threads.
Definition at line 133 of file private_server.cpp.
Referenced by adjust_job_count_estimate(), private_server(), tbb::internal::rml::private_worker::run(), try_insert_in_asleep_list(), and wake_some().
|
private |
Stack size for each thread. */.
Definition at line 126 of file private_server.cpp.
Referenced by tbb::internal::rml::private_worker::wake_or_launch().
|
private |
Definition at line 138 of file private_server.cpp.
Referenced by private_server(), request_close_connection(), and ~private_server().