MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / NewAsyncExecutor

Function NewAsyncExecutor

ai-provider/local/executor.go:125–136  ·  view source on GitHub ↗

NewAsyncExecutor 创建一个新的异步任务执行器

(queueSize int)

Source from the content-addressed store, hash-verified

123
124// NewAsyncExecutor 创建一个新的异步任务执行器
125func NewAsyncExecutor(queueSize int) *AsyncExecutor {
126 ctx, cancel := context.WithCancel(context.Background())
127 executor := &AsyncExecutor{
128 ctx: ctx,
129 cancel: cancel,
130 pipelines: make(map[string]*modelPipeline), // 以模型为 key,存管道列表
131 msgQueue: make(chan messageTask, queueSize),
132 }
133 executor.StartMessageDistributor()
134
135 return executor
136}
137
138func (e *AsyncExecutor) GetModelPipeline(model string) (*modelPipeline, bool) {
139 e.mu.Lock()

Callers 1

executor.goFile · 0.85

Calls 1

Tested by

no test coverage detected