Maverick uses one thread to "think" and the other to capture the input. So in the 8 concurrent game scenario there are really 16 threads spinning - I don't know if this is a problem. When I reduce the concurrent games to 4 it seems OK - strange!
I also set the buffers:
Code: Select all
setbuf(stdout, NULL); setbuf(stdin, NULL); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stdin, NULL, _IONBF, 0);
I'm assuming this is a problem with Maverick (has anyone else had this problem with CuteChess-cli). The most obvious possibility is a rare race condition between the two threads. But it's difficult to debug as I cannot even write to a text file when there are 8 concurrent games going on.
Any thoughts or suggestions would be appreciated!