internal

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 3 Imported by: 0

README

Goroutine local storage

Experimental Goroutine local storage using GoRoutine address as the ID library for golang.

This package is heavily inspired by tylerb' gls package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getg

func Getg() unsafe.Pointer

Getg return the current go routine address

Types

type TimeMap

type TimeMap interface {
	// Get
	Get(key uintptr) (val interface{}, ok bool)

	// Put
	Put(key uintptr, obj interface{}, timeout time.Duration) interface{}

	// Delete
	Delete(key uintptr)
}

TimeMap interface

func NewTimeMap

func NewTimeMap() TimeMap

NewTimeMap create a new TimeMap

Jump to

Keyboard shortcuts

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