()
| 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() |
nothing calls this directly
no test coverage detected