routine

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Types

type IThreadLocal

type IThreadLocal interface {
	Clear()
	Index() int
}

type LocalStorage

type LocalStorage[T any] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*LocalStorage[T]) Clear

func (ls *LocalStorage[T]) Clear()

func (*LocalStorage[T]) Get

func (ls *LocalStorage[T]) Get() (r T)

func (*LocalStorage[T]) Remove

func (ls *LocalStorage[T]) Remove()

func (*LocalStorage[T]) Set

func (ls *LocalStorage[T]) Set(value T)

type ThreadLocal

type ThreadLocal[T any] struct {
	LocalStorage[T]
	// contains filtered or unexported fields
}

func NewThreadLocal

func NewThreadLocal[T any](value T) *ThreadLocal[T]

func (*ThreadLocal[T]) Index

func (tl *ThreadLocal[T]) Index() int

type ThreadLocalManager

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

func (*ThreadLocalManager) Add

func (m *ThreadLocalManager) Add(threadLocal IThreadLocal)

func (*ThreadLocalManager) Clear

func (m *ThreadLocalManager) Clear()

func (*ThreadLocalManager) Remove

func (m *ThreadLocalManager) Remove(index int)

func (*ThreadLocalManager) RemoveThreadLocal

func (m *ThreadLocalManager) RemoveThreadLocal(threadLocal IThreadLocal)

Jump to

Keyboard shortcuts

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