util

package
v0.0.0-...-7b0d77e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(f func())

a nice way to create a block of code with scope

func CeilPow2

func CeilPow2(x int) int

func IsReallyNil

func IsReallyNil(value Any) bool

func LockUnlock

func LockUnlock(l sync.Locker) func()

func Max

func Max(x, y int) int

func MaxU64

func MaxU64(x, y uint64) uint64

func Min

func Min(i, j int) int

func MinU64

func MinU64(i, j uint64) uint64

func PanicIfNotNil

func PanicIfNotNil(value interface{}) bool

func Recover

func Recover(handler func(issue Any))

func Stringify

func Stringify(err_ptr *error)

Types

type Any

type Any interface{}

type ErrorString

type ErrorString string

func (ErrorString) Error

func (this ErrorString) Error() string

type Pool

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

func (*Pool) Get

func (self *Pool) Get() (ret PoolItemHandle)

func (*Pool) Init

func (self *Pool) Init(capacity uint, factory func() PoolItem) *Pool

func (*Pool) Invalidate

func (self *Pool) Invalidate() (cleanup func())

func (*Pool) Return

func (self *Pool) Return(obj PoolItemHandle)

type PoolItem

type PoolItem interface {
	Close()
}

type PoolItemHandle

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

func (*PoolItemHandle) Get

func (self *PoolItemHandle) Get() interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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