MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / run

Method run

sdk/cliproxy/usage/manager.go:271–286  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

269}
270
271func (m *Manager) run(ctx context.Context) {
272 for {
273 m.mu.Lock()
274 for !m.closed && len(m.queue) == 0 {
275 m.cond.Wait()
276 }
277 if len(m.queue) == 0 && m.closed {
278 m.mu.Unlock()
279 return
280 }
281 item := m.queue[0]
282 m.queue = m.queue[1:]
283 m.mu.Unlock()
284 m.dispatch(item)
285 }
286}
287
288func (m *Manager) dispatch(item queueItem) {
289 m.pluginsMu.RLock()

Callers 3

handleWebsocketMethod · 0.95
StartMethod · 0.95

Calls 1

dispatchMethod · 0.95

Tested by

no test coverage detected