Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
signals.hh
Go to the documentation of this file.
1#pragma once
3
4#include "types.hh"
5#include "error.hh"
6#include "logging.hh"
7
8#include <functional>
9
10namespace nix {
11
12/* User interruption. */
13
17static inline void setInterrupted(bool isInterrupted);
18
22static inline bool getInterrupted();
23
28
32inline void checkInterrupt();
33
37MakeError(Interrupted, BaseError);
38
39
41{
42 virtual ~InterruptCallback() { };
43};
44
51std::unique_ptr<InterruptCallback> createInterruptCallback(
52 std::function<void()> callback);
53
61struct ReceiveInterrupts;
62
63}
64
65#include "signals-impl.hh"
Definition error.hh:108
This file defines two main structs/classes used in nix error handling.
std::unique_ptr< InterruptCallback > createInterruptCallback(std::function< void()> callback)
void setInterruptThrown()
void checkInterrupt()
Definition signals.hh:41