MCPcopy
hub / github.com/fish2018/pansou / initAsyncPlugin

Function initAsyncPlugin

plugin/plugin.go:306–325  ·  view source on GitHub ↗

initAsyncPlugin 初始化异步插件配置

()

Source from the content-addressed store, hash-verified

304
305// initAsyncPlugin 初始化异步插件配置
306func initAsyncPlugin() {
307 initLock.Lock()
308 defer initLock.Unlock()
309
310 if initialized {
311 return
312 }
313
314 // 如果配置已加载,则从配置读取工作池大小
315 maxWorkers := defaultMaxBackgroundWorkers
316 if config.AppConfig != nil {
317 maxWorkers = config.AppConfig.AsyncMaxBackgroundWorkers
318 }
319
320 backgroundWorkerPool = make(chan struct{}, maxWorkers)
321
322 // 异步插件本地缓存系统已移除,现在只依赖主缓存系统
323
324 initialized = true
325}
326
327// InitAsyncPluginSystem 导出的初始化函数,用于确保异步插件系统初始化
328func InitAsyncPluginSystem() {

Callers 3

InitAsyncPluginSystemFunction · 0.85
NewBaseAsyncPluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected