MCPcopy
hub / github.com/shareAI-lab/learn-claude-code / inbox_poller

Function inbox_poller

s15_agent_teams/code.py:934–942  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

932 events.put(("user", line))
933
934 def inbox_poller():
935 # Poll ~1s and wake the Lead when async results are ready: teammate
936 # inbox messages or completed background tasks. Don't gate on
937 # active_teammates: a teammate sends its result and then removes itself,
938 # so the final message can outlive its registry entry.
939 while True:
940 time.sleep(1)
941 if BUS.peek("lead") or has_pending_background():
942 events.put(("wake", None))
943
944 threading.Thread(target=input_reader, daemon=True).start()
945 threading.Thread(target=inbox_poller, daemon=True).start()

Callers

nothing calls this directly

Calls 2

has_pending_backgroundFunction · 0.85
peekMethod · 0.80

Tested by

no test coverage detected