would like to ask a related question about something that is still very
unclear to me: if multiple threads are calling run(), what happens? say a
bunch of threads invoke run() on the same Rete object in the following
order:

  thread 1 ->rete.run()
  thread 2 ->rete.run()
  thread 3 ->rete.run()
  ....
  thread N ->rete.run()

could this result in an illegal system state if any of the run() calls
overlap? could this crash Rete, or cause unexpected exceptions, etc.?

will each call to run() execute in isolation from the others?

will each thread return from rete.run() in the order 1-2-3-N, or is it
possible that it could be 2-3-N-1 or N-3-2-1, or something else? (i suspect
the answer is yes...)

is it possible, with enough threads continously calling rete.run(), that a
thread could get stuck waiting indefinitely, so that i *have* to lock the
rete instance in order to guarantee reasonably consistent service time for
all threads?

troy

--------------------------------------------------------------------
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