#include <local_thread.h>
Definition at line 15 of file local_thread.h.
◆ LocalThread()
| nndeploy::thread_pool::LocalThread::LocalThread |
( |
| ) |
|
|
inlineexplicit |
◆ ~LocalThread()
| nndeploy::thread_pool::LocalThread::~LocalThread |
( |
| ) |
|
|
inline |
◆ destroy()
| void nndeploy::thread_pool::LocalThread::destroy |
( |
| ) |
|
|
inline |
所有线程类的 destroy 函数应该是一样的 但是init函数不一样,因为线程构造函数不同
- Returns
Definition at line 31 of file local_thread.h.
◆ init()
| void nndeploy::thread_pool::LocalThread::init |
( |
| ) |
|
|
inline |
◆ popTask()
| bool nndeploy::thread_pool::LocalThread::popTask |
( |
RTask & |
task | ) |
|
|
inline |
◆ pushTask()
| void nndeploy::thread_pool::LocalThread::pushTask |
( |
RTask && |
task | ) |
|
|
inline |
依次push到任一队列里。如果都失败,则yield,然后重新push
- Parameters
-
- Returns
Definition at line 83 of file local_thread.h.
◆ run()
◆ setThreadPoolInfo()
| void nndeploy::thread_pool::LocalThread::setThreadPoolInfo |
( |
int |
index, |
|
|
std::vector< LocalThread * > * |
pool_threads, |
|
|
int |
total_thread_size |
|
) |
| |
|
inline |
◆ stealTask()
| bool nndeploy::thread_pool::LocalThread::stealTask |
( |
RTask & |
task | ) |
|
|
inline |
◆ cv_
| std::condition_variable nndeploy::thread_pool::LocalThread::cv_ |
|
protected |
◆ done_
| bool nndeploy::thread_pool::LocalThread::done_ |
|
protected |
◆ index_
| int nndeploy::thread_pool::LocalThread::index_ |
|
protected |
◆ mutex_
| std::mutex nndeploy::thread_pool::LocalThread::mutex_ |
|
protected |
◆ pool_threads_
| std::vector<LocalThread *>* nndeploy::thread_pool::LocalThread::pool_threads_ |
|
protected |
◆ primary_queue_
◆ steal_targets_
| std::vector<int> nndeploy::thread_pool::LocalThread::steal_targets_ |
|
protected |
◆ thread_
| std::thread nndeploy::thread_pool::LocalThread::thread_ |
|
protected |
◆ total_thread_size_
| int nndeploy::thread_pool::LocalThread::total_thread_size_ |
|
protected |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/nndeploy-zh/checkouts/stable/framework/include/nndeploy/thread_pool/local_thread.h