Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to poll stdin during thinking? - additional info...

Author: Tony Werten

Date: 09:30:44 12/12/01

Go up one level in this thread


On December 12, 2001 at 11:43:05, Severi Salminen wrote:

>>In what language? At what platform? It can't be done in any portable fashion.
>
>Oh, sorry, I forgot to tell. PC/WIN98 and Visual C++ 6.0. And I have done it in
>C only, so no C++. I hope this info might help :)

The way I have done it ( in Delphi but that doesn't really differ) is create a
simple function that does a blocking read.

Then there use another function (createthread) that creates a different thread
for this specific function.

If the function reads something, I just set a global boolean
something_is_waiting and poll for this bool in my search.

Tony

>
>Severi



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.