Author: Bas Hamstra
Date: 04:00:54 09/27/00
Go up one level in this thread
Use PeekNamedPipe() to see if there is input without reading it. Bas Hamstra. On September 27, 2000 at 06:27:13, Mike Adams wrote: > In the past my engine has not read from the pipe untill after it was done >thinking. this meant the rematch command did not work half the time if it was >still thinking when the new game started. So i thought why doesnt pulsar look >at the pipe every 5000 nodes to see if the result command has been issued. Also >this ability is neccesary for pondering. > i use the read statement to read the pipe. a=read(0, buffer, 500); >this works fine accept when i called it during search there was nothing in the >pipe and it just hung tell i resigned, i was playing it as a guest, then it got >the result info and it told it the game was over. i put output before and after >the read statement so i realized it never left the line of code involving read >tell there was something to read. > How do i poll the pipe to see if something is there before calling read in >c? I see in engine info.txt that the select command is recomended but in >reading msdn i can find nothing involving select that is for c. Sample code >would be appreciated. Pulsar uses windows 98.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.