Module git_repository::interrupt[][src]

Expand description

Process-global interrupt handling

This module contains facilities to globally request an interrupt, which will cause supporting computations to abort once it is observed. Such checks for interrupts are provided in custom implementations of various traits to transparently add interrupt support to methods who wouldn’t otherwise by injecting it. see Read.

Structs

A wrapper for an inner iterator which will check for interruptions on each iteration.

A wrapper for implementors of std::io::Read or std::io::BufRead with interrupt support.

Statics

The flag behind all utility functions in this module.

Functions

Initialize a signal handler to listen to SIGINT and SIGTERM and trigger our trigger() that way. Also trigger interrupt() which promises to never use a Mutex, allocate or deallocate.

Returns true if an interrupt is requested.

Sets the interrupt request to false, thus allowing those checking for is_triggered() to proceed.

Trigger an interrupt, signalling to those checking for is_triggered() to stop what they are doing.