Commit c432586
Fix RunEngine thread blocking on engine.play() after kill signal
When the analysis thread is interrupted via _kill.set(), if no bestmove
was found yet (bm is None), RunEngine.run() falls through to
engine.play(board, Limit(depth=None)) — an unconstrained synchronous
call that blocks the thread indefinitely. This makes join() hang and
freezes the GUI.
Fix: skip the engine.play() fallback when _kill is set, and also make
the move delay loop respect the kill signal.
Agent-Logs-Url: https://github.com/fsmosca/Python-Easy-Chess-GUI/sessions/225e88fb-0a7d-479d-8208-22d1eb8867e0
Co-authored-by: fsmosca <22366935+fsmosca@users.noreply.github.com>1 parent 90ab247 commit c432586
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
698 | 700 | | |
699 | 701 | | |
700 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
701 | 705 | | |
702 | 706 | | |
703 | 707 | | |
| |||
0 commit comments