Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coroutine ¶
type Coroutine struct {
ID string
Name string
Ctx context.Context
Cancel context.CancelFunc
StartedAt time.Time
CompletedAt time.Time
State CoroutineState
Priority int
Error error
Result lua.LValue
}
Coroutine 协程结构体
type CoroutineManager ¶
type CoroutineManager struct {
// contains filtered or unexported fields
}
CoroutineManager 协程管理器
type CoroutineModule ¶
type CoroutineModule struct{}
CoroutineModule 协程模块
func (*CoroutineModule) IsAvailable ¶
func (m *CoroutineModule) IsAvailable() bool
IsAvailable 检查模块是否可用
type CoroutinePool ¶
type CoroutinePool struct {
// contains filtered or unexported fields
}
CoroutinePool 协程池
func NewCoroutinePool ¶
func NewCoroutinePool(name string, maxWorkers, maxTasks int) *CoroutinePool
NewCoroutinePool 创建协程池
func (*CoroutinePool) GetStats ¶
func (p *CoroutinePool) GetStats() map[string]interface{}
GetStats 获取协程池统计信息
type CoroutineState ¶
type CoroutineState int
CoroutineState 协程状态
const ( StatePending CoroutineState = iota // 等待中 StateRunning // 运行中 StateCompleted // 已完成 StateCancelled // 已取消 StateError // 错误 )
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler 调度器
func (*Scheduler) SetPriority ¶
SetPriority 设置优先级
Click to show internal directories.
Click to hide internal directories.