MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / beginLsUse

Function beginLsUse

src/langserver.js:320–328  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

318}
319
320export function beginLsUse(port) {
321 const entry = getLsEntryByPort(port);
322 if (!entry) return null;
323 const key = keyByPort(port);
324 if (key && (_maintenanceUses.get(key) || 0) > 0) return null;
325 entry.activeRequests = (entry.activeRequests || 0) + 1;
326 touchEntry(entry);
327 return entry;
328}
329
330export function endLsUse(port) {
331 const entry = getLsEntryByPort(port);

Callers 1

acquireLsUseOrThrowFunction · 0.90

Calls 3

getLsEntryByPortFunction · 0.85
keyByPortFunction · 0.85
touchEntryFunction · 0.85

Tested by

no test coverage detected