Ernest Friedman-Hill wrote:
> Yes, indeed. executeCommand() can only be executing one command at a
> time, so multiple threads will exclude one another (not a deadlock at
> all; the requests are just "serialized", or done one at a time.)

yes, I meant deadlock in the way my rules were designed, they
wouldn't let (run) finish till the other thread had asserted the fact.

> Your workaround is not terrible, but there are others. If you're going
> to drive everything from Java code, then you shouldn't use
> executeCommand() and assertString() at all, really; they are just
> there to make life easier for people who are running one or two
> commands. Note that the Rete class has a number of public methods to
> make driving programs easier: run(), reset(), halt(), and assert(),
> for example. Using these is considerably more efficient than creating
> Funcalls to run the equivalent Jess language commands, and much more
> efficient than using executeCommand to parse a String, which will then
> create a Funcall, which will then call the methods on the Rete class!
> For things which don't have an equivalent method in Rete, then
> Funcalls are the way to go.

thanks, I'll correct my stuff to avoid the unnecessary parsing.

> By the way, the manual explains how to build Fact objects pretty
> clearly, I thought; see section 4.7.

After reading it, now, I can't help but agree with you.

Richendra.
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to