|
vitrio 0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
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. | |
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.
|
explicit |
Start the threads.
| tasks | Where the computations the transfers need run. Must not be null. |
| std::invalid_argument | If tasks is null. |
| std::system_error | If a thread can not be started. |
|
noexcept |
Get what the library carries out the transfers with.
It is for the library alone, which does not export it.