goroutine

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGoId

func GetGoId() uint64

GetGoId 获取协程id 依赖先执行拷贝动作,将EllynGetGoid方法写入go源码目录,可以参考脚本 - goid_init.sh - goid_init.bat

func GetRoutineCtx added in v0.1.2

func GetRoutineCtx() uintptr

func SetRoutineCtx added in v0.1.2

func SetRoutineCtx(ctx uintptr)

Types

type RoutineLocal

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

func (*RoutineLocal[T]) Clear

func (rl *RoutineLocal[T]) Clear()

func (*RoutineLocal[T]) Get

func (rl *RoutineLocal[T]) Get() (res T, exist bool)

func (*RoutineLocal[T]) Set

func (rl *RoutineLocal[T]) Set(val T)

type RoutinePool

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

func NewRoutinePool

func NewRoutinePool(routineNum int, ignorePanic bool) *RoutinePool

func (*RoutinePool) Shutdown

func (p *RoutinePool) Shutdown()

func (*RoutinePool) Submit

func (p *RoutinePool) Submit(r Runnable)

type Runnable

type Runnable func()

Jump to

Keyboard shortcuts

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