Block until associated subprocess exits, returning/raising the result. This acts identically to the end of a synchronously executed ``run``, namely that: - various background threads (such as IO workers) are themselves joined; - if the subprocess
(self)
| 1650 | setattr(self, key, value) |
| 1651 | |
| 1652 | def join(self) -> Result: |
| 1653 | """ |
| 1654 | Block until associated subprocess exits, returning/raising the result. |
| 1655 | |
| 1656 | This acts identically to the end of a synchronously executed ``run``, |
| 1657 | namely that: |
| 1658 | |
| 1659 | - various background threads (such as IO workers) are themselves |
| 1660 | joined; |
| 1661 | - if the subprocess exited normally, a `Result` is returned; |
| 1662 | - in any other case (unforeseen exceptions, IO sub-thread |
| 1663 | `.ThreadException`, `.Failure`, `.WatcherError`) the relevant |
| 1664 | exception is raised here. |
| 1665 | |
| 1666 | See `~Runner.run` docs, or those of the relevant classes, for further |
| 1667 | details. |
| 1668 | """ |
| 1669 | try: |
| 1670 | return self.runner._finish() |
| 1671 | finally: |
| 1672 | self.runner.stop() |
| 1673 | |
| 1674 | def __enter__(self) -> "Promise": |
| 1675 | return self |