chapter01

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegister

func NewRegister() mappings.Register

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

func RaceCondition

func RaceCondition() error

RaceCondition -- 競合状態のサンプルです.

REFERENCES:

  • P.5

func RaceConditionFixWithChannel

func RaceConditionFixWithChannel() error

RaceConditionFixWithChannel -- チャネルを使い競合状態を回避するサンプルです。

バッファ無しのchannel を利用することで、処理の流れを決定的にし、非同期処理が存在するが、常に同じ結果になるようにしています。

func RaceConditionFixWithMutex

func RaceConditionFixWithMutex() error

RaceConditionFixWithMutex -- sync.Mutex を使って ロック をかけて値の更新をすることで競合状態を回避するサンプルです.

Types

This section is empty.

Jump to

Keyboard shortcuts

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