Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
signals-impl.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/util/types.hh
"
5
#include "
nix/util/fun.hh
"
6
7
#include <memory>
8
9
namespace
nix {
10
11
class
InterruptCallback
;
12
13
/* User interruption. */
14
15
static
inline
void
setInterrupted(
bool
isInterrupted)
16
{
17
/* Do nothing for now */
18
}
19
20
static
inline
bool
getInterrupted()
21
{
22
return
false
;
23
}
24
25
static
inline
bool
isInterrupted()
26
{
27
/* Do nothing for now */
28
return
false
;
29
}
30
31
inline
void
checkInterrupt
()
32
{
33
/* Do nothing for now */
34
}
35
39
struct
ReceiveInterrupts
40
{
44
~ReceiveInterrupts
() {}
45
};
46
47
inline
std::unique_ptr<InterruptCallback> createSignalCallback(SignalType type, fun<
void
()> callback)
48
{
49
return
{};
50
}
51
52
inline
std::unique_ptr<InterruptCallback>
createInterruptCallback
(
fun
<
void
()> callback)
53
{
54
return
{};
55
}
56
57
}
// namespace nix
nix::fun
Definition
fun.hh:19
fun.hh
nix::createInterruptCallback
std::unique_ptr< InterruptCallback > createInterruptCallback(fun< void()> callback)
Definition
signals.cc:227
nix::checkInterrupt
void checkInterrupt()
Definition
signals-impl.hh:90
nix::InterruptCallback
Definition
signals.hh:49
nix::ReceiveInterrupts
Definition
signals-impl.hh:102
nix::ReceiveInterrupts::~ReceiveInterrupts
~ReceiveInterrupts()
Definition
signals-impl.hh:44
types.hh
libutil
windows
include
nix
util
signals-impl.hh
Generated by
1.18.0