Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Separate Thread or plain Loop??

Author: Ralf Elvsén

Date: 07:11:44 12/18/01

Go up one level in this thread


On December 18, 2001 at 07:27:47, Steve Maughan wrote:

>I'm thinking about implementing pondering in my chess progam.  I guess I have
>two options - either create a separate thread for the engine or use some form of
>loop that checks for input and responds accordingly.  The latter seems like a
>pseudo thread and may take up significant processor time.  I have never written
>a program that creates separate threads and I guess that if I do go down that
>route I'll have to deal with syncronization and other unknown complications.

This is what I would recommend. Sure, there will be a learning curve,
but you will learn something really useful. The multithreaded approach
will give a nicer program structure.

Ralf
>
>Do others create separate threads?  Are there any advantages / disadvantages
>with creating a separate thread for the search?  What effect will it have on the
>speed?  Will it mean that in the long-run it will be able to interface more
>smoothly with the GUI?  Are there any simple solutions?
>
>All help appreciated!
>
>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.