MCPcopy Index your code
hub / github.com/codeaashu/claude-code / tryStart

Method tryStart

src/utils/QueryGuard.ts:61–67  ·  view source on GitHub ↗

* Start a query. Returns the generation number on success, * or null if a query is already running (concurrent guard). * Accepts transitions from both idle (direct user submit) * and dispatching (queue processor path).

()

Source from the content-addressed store, hash-verified

59 * and dispatching (queue processor path).
60 */
61 tryStart(): number | null {
62 if (this._status === 'running') return null
63 this._status = 'running'
64 ++this._generation
65 this._notify()
66 return this._generation
67 }
68
69 /**
70 * End a query. Returns true if this generation is still current

Callers 1

REPLFunction · 0.80

Calls 1

_notifyMethod · 0.95

Tested by

no test coverage detected