MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / drain_notifications

Method drain_notifications

benches/memory_usage.py:368–378  ·  view source on GitHub ↗

Read and discard notifications for *seconds*.

(self, seconds: float)

Source from the content-addressed store, hash-verified

366 raise TimeoutError(f"Indexing did not finish within {timeout}s")
367
368 def drain_notifications(self, seconds: float) -> None:
369 """Read and discard notifications for *seconds*."""
370 deadline = time.monotonic() + seconds
371 while time.monotonic() < deadline:
372 remaining = deadline - time.monotonic()
373 if remaining <= 0:
374 break
375 try:
376 self._notifications.get(timeout=min(remaining, 0.5))
377 except queue.Empty:
378 pass
379
380 def shutdown(self) -> None:
381 """Send shutdown + exit."""

Callers 2

run_hello_worldFunction · 0.95
run_laravel_modelFunction · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected