tf::WorkerView
taskflow/core/worker.hpp
class friend class Executor Executor tf::WorkerView::Executor Executor
const Worker & const Worker& tf::WorkerView::_worker _worker tf::WorkerView::_worker
size_t size_t tf::WorkerView::id () const id tf::WorkerView::id

queries the worker id associated with its parent executor

A worker id is a unsigned integer in the range `[0, N)`, where `N` is the number of workers spawned at the construction time of the executor.

size_t size_t tf::WorkerView::queue_size () const queue_size tf::WorkerView::queue_size

queries the size of the queue (i.e., number of pending tasks to run) associated with the worker

size_t size_t tf::WorkerView::queue_capacity () const queue_capacity tf::WorkerView::queue_capacity

queries the current capacity of the queue

tf::WorkerView::WorkerView
(const Worker &)
WorkerView
tf::WorkerView::WorkerView
const Worker & w
tf::WorkerView::WorkerView
(const WorkerView &)=default
WorkerView
tf::WorkerView::WorkerView
const WorkerView &

class to create an immutable view of a worker

An executor keeps a set of internal worker threads to run tasks. A worker view provides users an immutable interface to observe when a worker runs a task, and the view object is only accessible from an observer derived from tf::ObserverInterface.

- tf::WorkerView
  _worker
- tf::WorkerView
  Executor
- tf::WorkerView
  id
- tf::WorkerView
  queue_capacity
- tf::WorkerView
  queue_size
- tf::WorkerView
  WorkerView
- tf::WorkerView
  WorkerView