interrupt_handler

package
v2.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ABORT_POLLING_INTERVAL = 500 * time.Millisecond
View Source
const ABORT_REPEAT_INTERRUPT_DURATION = 30 * time.Second
View Source
const TIMEOUT_REPEAT_INTERRUPT_FRACTION_OF_TIMEOUT = 10
View Source
const TIMEOUT_REPEAT_INTERRUPT_MAXIMUM_DURATION = 30 * time.Second

Variables

This section is empty.

Functions

func SwallowSigQuit

func SwallowSigQuit()

Types

type InterruptCause

type InterruptCause uint
const (
	InterruptCauseInvalid InterruptCause = iota

	InterruptCauseSignal
	InterruptCauseTimeout
	InterruptCauseAbortByOtherProcess
)

func (InterruptCause) String

func (ic InterruptCause) String() string

type InterruptHandler

type InterruptHandler struct {
	// contains filtered or unexported fields
}

func NewInterruptHandler

func NewInterruptHandler(timeout time.Duration, client parallel_support.Client) *InterruptHandler

func (*InterruptHandler) ClearInterruptPlaceholderMessage

func (handler *InterruptHandler) ClearInterruptPlaceholderMessage()

func (*InterruptHandler) InterruptMessageWithStackTraces

func (handler *InterruptHandler) InterruptMessageWithStackTraces() string

func (*InterruptHandler) SetInterruptPlaceholderMessage

func (handler *InterruptHandler) SetInterruptPlaceholderMessage(message string)

func (*InterruptHandler) Status

func (handler *InterruptHandler) Status() InterruptStatus

func (*InterruptHandler) Stop

func (handler *InterruptHandler) Stop()

type InterruptHandlerInterface

type InterruptHandlerInterface interface {
	Status() InterruptStatus
	SetInterruptPlaceholderMessage(string)
	ClearInterruptPlaceholderMessage()
	InterruptMessageWithStackTraces() string
}

type InterruptStatus

type InterruptStatus struct {
	Interrupted bool
	Channel     chan interface{}
	Cause       InterruptCause
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL