vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
vitrio::file_transfer_pool Class Referencefinal

Threads that carry out the reads and writes of files, each many at once, and hand the computations those need to an executor. More...

#include <vitrio/file_transfer_pool.hpp>

Public Member Functions

 file_transfer_pool (std::shared_ptr< executor > tasks)
 Start the threads.
 file_transfer_pool (const file_transfer_pool &other)=delete
 file_transfer_pool (file_transfer_pool &&other)=delete
file_transfer_pool & operator= (const file_transfer_pool &other)=delete
file_transfer_pool & operator= (file_transfer_pool &&other)=delete
const implementation & get_implementation () const noexcept
 Get what the library carries out the transfers with.

Detailed Description

Threads that carry out the reads and writes of files, each many at once, and hand the computations those need to an executor.

A file format is given a pool when it opens a file, and the reader or writer it opens keeps what it needs of the pool, so the pool may go before it.

The computations never wait. Work that waits for transfers of this pool must not occupy every thread of the executor, or the transfers could not finish.

The threads live until the pool and every reader and writer opened with it are gone, and the last of them waits for the transfers under way as it goes. None of them may go on a thread of the executor while a transfer is under way.

Constructor & Destructor Documentation

◆ file_transfer_pool()

vitrio::file_transfer_pool::file_transfer_pool ( std::shared_ptr< executor > tasks)
explicit

Start the threads.

Parameters
tasksWhere the computations the transfers need run. Must not be null.
Exceptions
std::invalid_argumentIf tasks is null.
std::system_errorIf a thread can not be started.

Member Function Documentation

◆ get_implementation()

const implementation & vitrio::file_transfer_pool::get_implementation ( ) const
noexcept

Get what the library carries out the transfers with.

It is for the library alone, which does not export it.

Returns
const implementation& What the pool holds.

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