(_)
| 29 | """Record the resolution of a Future returned by Condition.wait.""" |
| 30 | |
| 31 | def callback(_): |
| 32 | if not future.result(): |
| 33 | # wait() resolved to False, meaning it timed out. |
| 34 | self.history.append("timeout") |
| 35 | else: |
| 36 | self.history.append(key) |
| 37 | |
| 38 | future.add_done_callback(callback) |
| 39 |