(fut)
| 305 | |
| 306 | |
| 307 | def _get_loop(fut): |
| 308 | # Tries to call Future.get_loop() if it's available. |
| 309 | # Otherwise fallbacks to using the old '_loop' property. |
| 310 | try: |
| 311 | get_loop = fut.get_loop |
| 312 | except AttributeError: |
| 313 | pass |
| 314 | else: |
| 315 | return get_loop() |
| 316 | return fut._loop |
| 317 | |
| 318 | |
| 319 | def _set_result_unless_cancelled(fut, result): |