1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00
BadFish/src
Marco Costalba 9cb187762a Wait for main thread to finish before to exit
Currently after a 'quit' command UI thread raises stop
signal, exits from uci_loop() and calls Threads.exit()
while the search threads are still active.

In Threads.exit() main thread is asked to terminate, but
if it is parked in idle_loop() it will exit and free its
resources (in particular the shared Movepicker object) while
sibling slaves are still active and this leads to a crash.

The fix is to let the UI thread always wait for main thread
to finish the search before to return from uci_loop().

Found by Valgrind when running with 8 threads.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-12-29 10:33:06 +01:00
..
benchmark.cpp Reformat UCI option code 2011-12-27 00:56:11 +01:00
bitbase.cpp Rename Pieces 2011-12-28 10:38:48 +01:00
bitboard.cpp Retire SquaresByColorBB[] and enum SquareColor 2011-12-28 10:57:08 +01:00
bitboard.h Retire SquaresByColorBB[] and enum SquareColor 2011-12-28 10:57:08 +01:00
bitcount.h Move all enum types definitions to types.h 2011-02-23 21:52:55 +01:00
book.cpp Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
book.h Retire move.h 2011-12-04 11:36:03 +01:00
endgame.cpp Use for_each() in Endgames d'tor 2011-12-29 10:25:11 +01:00
endgame.h Use for_each() in Endgames d'tor 2011-12-29 10:25:11 +01:00
evaluate.cpp Add user-defined conversions to UCIOption 2011-12-28 19:42:50 +01:00
evaluate.h Move pawn and material tables under Thread class 2011-04-24 17:07:22 +01:00
history.h Retire update_history() Inline the only caller site 2011-12-16 19:17:47 +01:00
lock.h Use a timer to avoid polling 2011-11-05 18:19:38 +01:00
main.cpp Restore std::cout instead of printf() 2011-12-25 09:29:51 +01:00
Makefile Rewrite async I/O 2011-11-26 11:51:12 +01:00
material.cpp Rename Pieces 2011-12-28 10:38:48 +01:00
material.h Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
misc.cpp Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
misc.h Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
move.cpp Fix disambiguation bug in move_to_san() 2011-12-04 12:24:15 +01:00
movegen.cpp Retire move.h 2011-12-04 11:36:03 +01:00
movegen.h Retire move.h 2011-12-04 11:36:03 +01:00
movepick.cpp Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
movepick.h Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
pawns.cpp Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
pawns.h Rename getters functions removing 'get_' prefix 2011-12-25 11:50:59 +01:00
position.cpp Retire SquaresByColorBB[] and enum SquareColor 2011-12-28 10:57:08 +01:00
position.h Rename Pieces 2011-12-28 10:38:48 +01:00
psqtab.h Retire move.h 2011-12-04 11:36:03 +01:00
rkiss.h Retire move.h 2011-12-04 11:36:03 +01:00
search.cpp Add user-defined conversions to UCIOption 2011-12-28 19:42:50 +01:00
search.h Retire RootMoveList 2011-12-12 20:13:24 +01:00
thread.cpp Wait for main thread to finish before to exit 2011-12-29 10:33:06 +01:00
thread.h Wait for main thread to finish before to exit 2011-12-29 10:33:06 +01:00
timeman.cpp Add user-defined conversions to UCIOption 2011-12-28 19:42:50 +01:00
timeman.h Retire move.h 2011-12-04 11:36:03 +01:00
tt.cpp Introduce and use struct MoveList 2011-07-02 14:04:33 +01:00
tt.h Retire move.h 2011-12-04 11:36:03 +01:00
types.h Retire SquaresByColorBB[] and enum SquareColor 2011-12-28 10:57:08 +01:00
uci.cpp Wait for main thread to finish before to exit 2011-12-29 10:33:06 +01:00
ucioption.cpp Use for_each() in Endgames d'tor 2011-12-29 10:25:11 +01:00
ucioption.h Add user-defined conversions to UCIOption 2011-12-28 19:42:50 +01:00