atomic - ActiveState ActiveGo 1.8
...

Package atomic

import "github.com/streadway/handy/atomic"
Overview
Index

Overview ▾

Package atomic implements atomic accessors for primitives

type Int

Int implements atomic 64bit int operations

type Int int64

func (*Int) Add

func (i *Int) Add(n int64)

Add increments i by n

func (*Int) Get

func (i *Int) Get() int64

Get returns the value without races.

func (*Int) String

func (i *Int) String() string

String returns the base 10 formatted value.