signals

package
v0.5.38 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 8 Imported by: 0

README

サンプルリスト

このディレクトリには以下のサンプルがあります。

file example name note
notify.go signal_notify signal.Notify のサンプルです
notifycontext.go signal_notify_context Go 1.16 から追加された signal.NotifyContext のサンプルです
stop.go signal_stop signal.Stop()のサンプルです

Documentation

Overview

Package signals -- シグナル関連のサンプルが配置されています。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegister

func NewRegister() mapping.Register

NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。

func Notify

func Notify() error

Notify は、 signal.Notify のサンプルです.

REFERENCES:

func NotifyContext

func NotifyContext() error

NotifyContext は、 Go 1.16 から追加された signal.NotifyContext のサンプルです.

REFERENCES:

func Stop added in v0.5.37

func Stop() error

Stop は、signal.Stop()のサンプルです.

signal.Notify()などでハンドル処理を追加した場合 ファイルの場合と同様に defer で signal.Stop() を呼ぶべき。

> Stop causes package signal to stop relaying incoming signals to c. It undoes the effect of all prior calls to Notify using c. When Stop returns, it is guaranteed that c will receive no more signals.

> Stopは、パッケージ・シグナルがcへの受信シグナルのリレーを停止させる。 ストップが戻れば、cはそれ以上シグナルを受け取らないことが保証される。

REFERENCES

Types

This section is empty.

Jump to

Keyboard shortcuts

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