Initializes the ``SIGCHLD`` handler. The signal handler is run on an `.IOLoop` to avoid locking issues. Note that the `.IOLoop` used for signal handling need not be the same one used by individual Subprocess objects (as long as the ``IOLoops`` are each running in sep
(cls)
| 307 | |
| 308 | @classmethod |
| 309 | def initialize(cls) -> None: |
| 310 | """Initializes the ``SIGCHLD`` handler. |
| 311 | |
| 312 | The signal handler is run on an `.IOLoop` to avoid locking issues. |
| 313 | Note that the `.IOLoop` used for signal handling need not be the |
| 314 | same one used by individual Subprocess objects (as long as the |
| 315 | ``IOLoops`` are each running in separate threads). |
| 316 | |
| 317 | .. versionchanged:: 5.0 |
| 318 | The ``io_loop`` argument (deprecated since version 4.1) has been |
| 319 | removed. |
| 320 | |
| 321 | Availability: Unix |
| 322 | """ |
| 323 | if cls._initialized: |
| 324 | return |
| 325 | loop = asyncio.get_event_loop() |
| 326 | loop.add_signal_handler(signal.SIGCHLD, cls._cleanup) |
| 327 | cls._initialized = True |
| 328 | |
| 329 | @classmethod |
| 330 | def uninitialize(cls) -> None: |
no test coverage detected