Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to poll stdin during thinking?

Author: David Rasmussen

Date: 10:22:45 12/12/01

Go up one level in this thread


On December 12, 2001 at 11:37:02, Miguel A. Ballicora wrote:

>On December 12, 2001 at 10:54:47, Severi Salminen wrote:
>
>>Hi!
>>
>>How do you poll stdin during search? I just want to see if "quit" is sent to
>>engine during search.  Otherwise my engine keeps searching even if WB has
>>exited...
>>
>>And I don't know anything about multithreading. And I don't even wat to know ;)
>
>After a long while I managed to solve this problem with multithreading.
>The result is very clean.
>I knew nothing about multithreading when I started and I know nothing now :-)
>I am doing everything with two functions,

Yes. Multithreading will make make such a task very simple with a very nice and
clean design. And there are several quasi-portable threading libraries. Pthreads
and ACE spring to mind. I will make the input a separate thread when I am making
the search multithreaded as well.

/David



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.