Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Interruption and C++

Author: Steven Edwards

Date: 09:33:14 08/26/03

Go up one level in this thread


On August 26, 2003 at 08:08:19, Anthony Cozzie wrote:

>On August 26, 2003 at 07:34:42, dominique LONGBIEN wrote:

>>Is any body use an interruption (i.e. every 200ms) to look at the input buffer
>>to know if a message from winboard or arena is present ?
>>If yes, how should i declare this interrupt in C++ for windows ?

>There are two usual approaches:
>
>Crafty does something like:
>
>if(nodes % 10000 == 0 && check_for_input())
>  process_input();
>
>Zappa sets up a few threads and has one block on fgets.  Crafty's is definitely
>easier, but I think Zappa's is cleaner. YMMV.

Setting up a separate thread is the way to go.  It is both more efficient and
more portable.



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.