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

Method Start

sdk/cliproxy/usage/manager.go:189–201  ·  view source on GitHub ↗

Start launches the background dispatcher. Calling Start multiple times is safe.

(ctx context.Context)

Source from the content-addressed store, hash-verified

187
188// Start launches the background dispatcher. Calling Start multiple times is safe.
189func (m *Manager) Start(ctx context.Context) {
190 if m == nil {
191 return
192 }
193 m.once.Do(func() {
194 if ctx == nil {
195 ctx = context.Background()
196 }
197 var workerCtx context.Context
198 workerCtx, m.cancel = context.WithCancel(ctx)
199 go m.run(workerCtx)
200 })
201}
202
203// Stop stops the dispatcher and drains the queue.
204func (m *Manager) Stop() {

Callers 2

PublishMethod · 0.95
StartDefaultFunction · 0.45

Calls 2

runMethod · 0.95
DoMethod · 0.65

Tested by

no test coverage detected