Proxy class used to submit work to the thread pool.
A proxy act like a single thread pool, but it submits work to its parent thread pool. Using a proxy from multiple threads at the same time is undefined behaviour.
Note: Even if nothing prevent a proxy to be moved around threads, it should either be used in the creating thread or in a thread that does not belong to the pool, otherwise it may create a deadlock when joining.
Definition at line 59 of file vtkSMPThreadPool.h.
|
| | ~Proxy () |
| | Destructor.
|
| |
| | Proxy (const Proxy &)=delete |
| |
| Proxy & | operator= (const Proxy &)=delete |
| |
| | Proxy (Proxy &&) noexcept |
| |
| Proxy & | operator= (Proxy &&) noexcept |
| |
| void | Join () |
| | Blocks calling thread until all jobs are done.
|
| |
| void | DoJob (std::function< void()> job) |
| | Add a job to the thread pool queue.
|
| |
| std::vector< std::reference_wrapper< std::thread > > | GetThreads () const |
| | Get a reference on all system threads used by this proxy.
|
| |
| bool | IsTopLevel () const noexcept |
| | Return true is this proxy is allocated from a thread that does not belong to the pool.
|
| |