Signal the client waiting that a connection is ready. Return True if the client has "accepted" the connection, False otherwise (typically because wait() has timed out).
(self, conn: CT)
| 891 | return self.conn |
| 892 | |
| 893 | def set(self, conn: CT) -> bool: |
| 894 | """Signal the client waiting that a connection is ready. |
| 895 | |
| 896 | Return True if the client has "accepted" the connection, False |
| 897 | otherwise (typically because wait() has timed out). |
| 898 | """ |
| 899 | with self._cond: |
| 900 | if self.conn or self.error: |
| 901 | return False |
| 902 | |
| 903 | self.conn = conn |
| 904 | self._cond.notify_all() |
| 905 | return True |
| 906 | |
| 907 | def fail(self, error: Exception) -> bool: |
| 908 | """Signal the client that, alas, they won't have a connection today. |
no outgoing calls