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::synchronous_executor Class Referencefinal

An executor that runs a task on the calling thread, before submit returns. More...

#include <vitrio/concurrency/synchronous_executor.hpp>

Inheritance diagram for vitrio::synchronous_executor:
Inheritance graph
[legend]
Collaboration diagram for vitrio::synchronous_executor:
Collaboration graph
[legend]

Public Member Functions

 synchronous_executor (const synchronous_executor &other)=delete
 
 synchronous_executor (synchronous_executor &&other)=delete
 
synchronous_executor & operator= (const synchronous_executor &other)=delete
 
synchronous_executor & operator= (synchronous_executor &&other)=delete
 
void submit (std::unique_ptr< task > t, std::shared_ptr< completion_notifier > notifier) override
 Run a unit of work immediately, on the calling thread.
 
- Public Member Functions inherited from vitrio::executor
 executor (const executor &other)=default
 
 executor (executor &&other)=default
 
executor & operator= (const executor &other)=default
 
executor & operator= (executor &&other)=default
 

Detailed Description

An executor that runs a task on the calling thread, before submit returns.

Spawns no thread and keeps no state. A completion fed by a notifier submitted here is therefore already resolved by the time submit is back.

Member Function Documentation

◆ submit()

void vitrio::synchronous_executor::submit ( std::unique_ptr< task >  t,
std::shared_ptr< completion_notifier >  notifier 
)
overridevirtual

Run a unit of work immediately, on the calling thread.

Parameters
tThe work to run. Must not be null.
notifierWhere the outcome is reported. Must not be null.
Exceptions
std::invalid_argumentIf t or notifier is null.

Implements vitrio::executor.


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