Turi Create
4.0
|
Abstract implementation of TaskQueue that wraps turi::thread_pool. More...
#include <ml/neural_net/PosixTaskQueue.hpp>
Public Member Functions | |
void | DispatchAsync (std::function< void()> task) override |
void | DispatchSync (std::function< void()> task) override |
virtual void | DispatchApply (size_t n, std::function< void(size_t i)> task)=0 |
Abstract implementation of TaskQueue that wraps turi::thread_pool.
Definition at line 17 of file PosixTaskQueue.hpp.
|
pure virtualinherited |
Submits a function to this task queue n times, with arguments ranging from 0 to n - 1. When dispatched to a concurrent queue, the function must be reentrant. Rethrows the first exception thrown by any task invocation.
Implemented in turi::neural_net::GlobalPosixTaskQueue, turi::neural_net::SerialPosixTaskQueue, and turi::neural_net::GrandCentralDispatchQueue.
|
overridevirtual |
Submits a function to this task queue without waiting for the function to finish. The task must not throw an exception.
Implements turi::neural_net::TaskQueue.
|
overridevirtual |
Submits a function to this task queue and waits for the function to execute. The task must not throw an exception.
Implements turi::neural_net::TaskQueue.