Start server in background thread with asyncio event loop.
(self)
| 101 | _register_fork_handlers() |
| 102 | |
| 103 | def start(self): |
| 104 | """Start server in background thread with asyncio event loop.""" |
| 105 | if self._running: |
| 106 | return |
| 107 | |
| 108 | self._running = True |
| 109 | self._thread = threading.Thread(target=self._run_loop, daemon=True) |
| 110 | self._thread.start() |
| 111 | |
| 112 | # Track this server for fork handling |
| 113 | _active_servers.add(self) |
| 114 | |
| 115 | def stop(self): |
| 116 | """Stop server and cleanup socket.""" |