utils

package
v0.0.0-...-e717fee Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerOf

func ContainerOf(ptr unsafe.Pointer, memberOffset uintptr) unsafe.Pointer

ContainerOf We can use the unsafe package to perform pointer arithmetic, and have an intrusive data structure

func Hash

func Hash(s string) uint64

func Max

func Max(a int32, b int32) int32

Types

type ThreadPool

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

func GetThreadPoolInstance

func GetThreadPoolInstance() *ThreadPool

func (*ThreadPool) ThreadPoolQueue

func (tp *ThreadPool) ThreadPoolQueue(f func(interface{}), arg interface{})

type Work

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

Jump to

Keyboard shortcuts

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