This is actually a serious question to the Java cogniscenti: how to
generally interrupt a running thread without its cooperation. Java 1.2
has made some improvements in this regard, and your milage may vary,
but you may find that Thread.interrupt() will do what you
need. interrupt() is now SUPPOSED to immediately terminate blocking
reads, wait() calls, etc., via an InterruptedException. You can
combine interrupt() calls with polls to interrupted() in your
Thread.run() method. Whether this works or not depends at this point
on the quality of the VM implementation in use. Note that there isn't
much that Jess can do to help matters.



I think Parker, David wrote:
> 
> Hi
> 
> I am trying to run the rete engine from a user interface that should be able
> to interrupt a consultation.
> 
> The Rete.halt() method only stops the process at the end of an activation,
> which may be waiting for user input.
> 
> Is there a way of interrupting or halting the rete engine while it is
> waiting for user input, for instance, by inserting some control sequence
> into the input stream?
> 
> David
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to