Turi Create  4.0
turi::neural_net::GlobalPosixTaskQueue Class Reference

#include <ml/neural_net/PosixTaskQueue.hpp>

Public Member Functions

void DispatchApply (size_t n, std::function< void(size_t i)> task) override
 
void DispatchAsync (std::function< void()> task) override
 
void DispatchSync (std::function< void()> task) override
 

Detailed Description

Concrete implementation of PosixTaskQueue that wraps the global singleton thread_pool.

Definition at line 53 of file PosixTaskQueue.hpp.

Member Function Documentation

◆ DispatchApply()

void turi::neural_net::GlobalPosixTaskQueue::DispatchApply ( size_t  n,
std::function< void(size_t i)>  task 
)
overridevirtual

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.

Implements turi::neural_net::TaskQueue.

◆ DispatchAsync()

void turi::neural_net::PosixTaskQueue::DispatchAsync ( std::function< void()>  task)
overridevirtualinherited

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.

◆ DispatchSync()

void turi::neural_net::PosixTaskQueue::DispatchSync ( std::function< void()>  task)
overridevirtualinherited

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.


The documentation for this class was generated from the following file: