Input thread unde polyglot
Posted: 15 Aug 2005, 16:28
I have this strange error that appears under polyglot but not Arena UCI.
I have an Input thread that very simplified looks like this:
For example if I run "Analyze" from Arena this happens
During the search this thread is blocked at fgets(...) waiting for input.
(I have checked that)
When I stop Analyze different things happens in Arena UCI and polyglot under Arena or Winboard.
1) Under Arena UCI 'stop' is read by the fgets and everything is ok.
2) Under Winboard/Polyglot or ArenaWB/Polyglot, polyglot sends the 'stop' command (due to the polyglot log) but this time the fgets doesn't kick in.
I'm completely lost in this
It only happens under Polyglot but it is of course something stupid I made myself but what is it.....?
BTW. the stdin is unbuffered.
/Peter
I have an Input thread that very simplified looks like this:
- Code: Select all
char sCommand[2048];
while (!bQuit){ // until we leave
sCommand[0]='\0';
rc=fgets(c,2047,stdin);
bInputAvailable=true;
WaitForSingleObject(hGetInputEvent,INFINITE);
}
For example if I run "Analyze" from Arena this happens
During the search this thread is blocked at fgets(...) waiting for input.
(I have checked that)
When I stop Analyze different things happens in Arena UCI and polyglot under Arena or Winboard.
1) Under Arena UCI 'stop' is read by the fgets and everything is ok.
2) Under Winboard/Polyglot or ArenaWB/Polyglot, polyglot sends the 'stop' command (due to the polyglot log) but this time the fgets doesn't kick in.
I'm completely lost in this
It only happens under Polyglot but it is of course something stupid I made myself but what is it.....?
BTW. the stdin is unbuffered.
/Peter