by Richard Pijl » 10 Sep 2006, 16:10
My method is rather simple, and resembles a polling implementation.
The input thread is reading input, parsing the command, and when the command is found to be syntactically correct, pushes it into a command queue.
The main program/search is checking whether there is something on the command queue periodically, or when idle, when the input thread sends an event to the main program.
The main difference with the polling implementation is that search is only interrupted when there is a full command at the input. Not, like with polling input, when the operator just happened to have touched a key, or triggered the polling function by some other means (some mouse events in win2k did that to me as well). Just got sick of it and decided to do it this way.
Richard.