Commit 37a0324
committed
fix: increase thread join timeout and clarify redundant None assignments
Changes based on Copilot AI review (2 issues):
1. Thread join timeout was shorter than cleanup timeout (Issue #1):
- Changed _THREAD_JOIN_TIMEOUT from 5 to 12 seconds
- Must be >= cleanup timeout (10s) plus buffer for loop.stop()
- Prevents thread abandonment during active cleanup
2. Added detailed comment for redundant None assignments (Issue #2):
- Explained why we set _session/_stdio_context to None even if
_cleanup_stdio_async() already did it
- Documents the safety cases: timeout, failure, skip, cancellation
- Makes code intent clear for future maintainers1 parent 837ef2d commit 37a0324
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
483 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
| |||
0 commit comments