Author: Paul
Date: 06:32:53 01/22/01
Go up one level in this thread
On January 22, 2001 at 08:33:54, Larry Griffiths wrote: >I tried it with a thread and had problems. Messages will only be processed when >Winboard is communicating and my program is running so I cannot move windows >when the other side is thinking... Ok, as I said, the only thing I know for now about comms with WinBoard is what I saw in TSCP ... that seems to work with an infinite loop and an fgets from stdin at the top to get commands from WB and printf's to send replies to WB. What I don't get is what happens when TSCP is thinking. A 'force move' command from WB can't get honoured, cause TSCP doesn't 'listen' while it's thinking I think :) But anyway ... I should first read Tim Mann's pages about this, but for now I see 3 solutions: 1. create a separate Engine DLL, so don't run my GUI at all when WB'ing. 2. use a TTimer object within the GUI thread to try to communicate with WB at regular intervals. 3. use a separate TThread object just for comms with WB, containg a loop ala TSCP, and sending messages to the GUI thread if something comes in. The GUI thread can then start/stop/etc the Engine thread as appropriate, just as if it were the user giving the command. The GUI thread uses a stack for msg's, so I don't see how moving a window would interfere with that, as the stack is processed sequentially? But of course I'm completely ignorant at this moment, and really should first study before writing this ;) groetjes, Paul
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.