Hi,
On Monday 04 November 2002 19:44, Gunnar Farnebäck wrote:
Bill wrote:
I think you are making this more complex than it needs to be:
Agreed.
Thanks, Bill, Gunnar, for bringing some simplification in the matter.
I have been looking into a simple implementation of the "abort" command for the *plus programs. There are some non-trivial issues:
1) I would use pthreads. This seems reasonable. I see three threads: main loop, GTP input, and a separate thread for "long" commands (see below). 2) There would be a separate thread for reading GTP commands. Should it (does it need to ?) queue the commands received or not? 3) Make an arbitrary distinction between "immediate" and "long" commands. I see two "long" commands right now: move generation and scoring. 4) Immediate commands are executed in an atomic way - they cannot be aborted. 5) "long" commands are started in a separate thread. This thread can be aborted if it has not reached the "commit point" at the end. At the commit point the engine makes changes to data structures that define its state. 6) Asynchronous commands: only abort right now.
What do you think?
Regards,