vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vitrio::executor Class Referenceabstract

Where a task is handed off to run, now or later. More...

#include <vitrio/concurrency/executor.hpp>

Inheritance diagram for vitrio::executor:
Inheritance graph
[legend]

Public Member Functions

 executor (const executor &other)=default
 
 executor (executor &&other)=default
 
executor & operator= (const executor &other)=default
 
executor & operator= (executor &&other)=default
 
virtual void submit (std::unique_ptr< task > t, std::shared_ptr< completion_notifier > notifier)=0
 Hand a unit of work off to this executor.
 

Detailed Description

Where a task is handed off to run, now or later.

Runs the submitted task and reports its outcome to the notifier it was submitted with exactly once, catching whatever the task throws rather than letting it escape. A task carries no notion of a completion itself; that pairing is made here, by whoever calls submit.

Thread safety
submit may be called concurrently.

Member Function Documentation

◆ submit()

virtual void vitrio::executor::submit ( std::unique_ptr< task >  t,
std::shared_ptr< completion_notifier >  notifier 
)
pure virtual

Hand a unit of work off to this executor.

Parameters
tThe work to run. Must not be null.
notifierWhere the outcome is reported. Must not be null.

Implemented in vitrio::synchronous_executor, and vitrio::thread_pool_executor.


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