Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: UCI protocol requires (?) non-blocking read for stdin

Author: Steve Maughan

Date: 14:06:15 01/12/05

Go up one level in this thread


Carlos,

There are two options:

1) Create a multi-threaded application where one thread always monitors stdin.
I use this technique in Monarch.  I use the Windows specific thread creation
routines but I believe you could use a thread library such as posix if you
require multi-platform support.

2) The other method is the use the PeekNamedPipe command - see

http://dietmonday.com/windows/WinDoc/msdn/sdk/platforms/doc/sdk/win32/func/src/f67_7.htm

this reads a pipe without removing the contents.  Many engines use this
successfully e.g. Fruit

Regards,

Steve



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.