vitrio
0.3.1
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
counting_notifier.hpp
1
// SPDX-License-Identifier: LGPL-2.1-or-later
2
3
#pragma once
4
5
#include <vitrio/concurrency/completion_notifier.hpp>
6
#include <vitrio/export.hpp>
7
#include <vitrio/platform.hpp>
8
9
#include <cstddef>
10
#include <memory>
11
12
namespace
vitrio
13
{
14
29
class
VITRIO_API
counting_notifier
final
30
:
public
completion_notifier
31
{
32
public
:
45
counting_notifier
(
46
std::size_t count,
47
std::shared_ptr<completion_notifier> parent
48
);
49
~counting_notifier
()
override
;
50
51
counting_notifier
(
const
counting_notifier
&other) =
delete
;
52
counting_notifier
(
counting_notifier
&&other) =
delete
;
53
counting_notifier
& operator=(
const
counting_notifier
&other) =
delete
;
54
counting_notifier
& operator=(
counting_notifier
&&other) =
delete
;
55
56
void
notify_done
(std::exception_ptr error =
nullptr
)
override
;
57
58
private
:
59
class
implementation;
60
VITRIO_STD_MEMBER_INTERFACE
61
std::unique_ptr<implementation> m_implementation;
62
};
63
64
}
// namespace vitrio
vitrio::counting_notifier::counting_notifier
counting_notifier(std::size_t count, std::shared_ptr< completion_notifier > parent)
Construct a notifier for a known number of units of work.
vitrio::counting_notifier::notify_done
void notify_done(std::exception_ptr error=nullptr) override
Report that one unit of work has finished.
vitrio
concurrency
counting_notifier.hpp
Generated by
1.15.0