YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
inject.cpp
Go to the documentation of this file.
1
#include <
yaclib/fault/inject.hpp
>
2
#include <
yaclib/fault/injector.hpp
>
3
4
namespace
yaclib
{
5
6
detail::Injector
*
GetInjector
()
noexcept
{
7
static
detail::Injector
instance
;
8
return
&
instance
;
9
}
10
11
void
InjectFault
()
noexcept
{
12
GetInjector
()->
MaybeInject
();
13
}
14
15
std::uint64_t
GetInjectedCount
()
noexcept
{
16
return
detail::Injector::GetInjectedCount
();
17
}
18
19
}
// namespace yaclib
yaclib::detail::Injector
Definition
injector.hpp:9
yaclib::detail::Injector::GetInjectedCount
static std::uint64_t GetInjectedCount() noexcept
Definition
injector.cpp:53
yaclib::detail::Injector::MaybeInject
void MaybeInject() noexcept
Definition
injector.cpp:13
inject.hpp
injector.hpp
yaclib
Definition
base_core.hpp:18
yaclib::GetInjector
detail::Injector * GetInjector() noexcept
Definition
inject.cpp:6
yaclib::InjectFault
void InjectFault() noexcept
Definition
inject.cpp:11
yaclib::GetInjectedCount
std::uint64_t GetInjectedCount() noexcept
Definition
inject.cpp:15
yaclib::MakeContract
Contract< V, E > MakeContract()
Creates related future and promise.
Definition
contract.hpp:25
src
fault
inject.cpp
Generated by
1.9.8