| 366 | # |
| 367 | |
| 368 | class _ParentProcess(BaseProcess): |
| 369 | |
| 370 | def __init__(self, name, pid, sentinel): |
| 371 | self._identity = () |
| 372 | self._name = name |
| 373 | self._pid = pid |
| 374 | self._parent_pid = None |
| 375 | self._popen = None |
| 376 | self._closed = False |
| 377 | self._sentinel = sentinel |
| 378 | self._config = {} |
| 379 | |
| 380 | def is_alive(self): |
| 381 | from multiprocessing.connection import wait |
| 382 | return not wait([self._sentinel], timeout=0) |
| 383 | |
| 384 | @property |
| 385 | def ident(self): |
| 386 | return self._pid |
| 387 | |
| 388 | def join(self, timeout=None): |
| 389 | ''' |
| 390 | Wait until parent process terminates |
| 391 | ''' |
| 392 | from multiprocessing.connection import wait |
| 393 | wait([self._sentinel], timeout=timeout) |
| 394 | |
| 395 | pid = ident |
| 396 | |
| 397 | # |
| 398 | # Create object representing the main process |
no outgoing calls
no test coverage detected
searching dependent graphs…