There is just one interpretation of "thread-safe": All operations on an
object are synchronized to avoid race conditions when two threads operate
concurrently on an object.
Therefore it is, for instance, possible for two different threads to call,
say, insert(): Locks ensure that one thread finishes the insertion before
the other one is permitted to enter the critical section.
Notice, also, that a method such as fireUntilHalt() would be useless if the
method would not guarantee proper synchronization while other threads (who
else?) insert or modify or retract.
Mark's statement "Each of the working memory actions hold a lock, so only
one thread at a time can enter." is somewhat misleading - there isn't one
lock "held" by "each of the WM actions". There is one lock to be
acquired
and released by each action.
-W
On 10 February 2012 23:46, apache <apache.zoom(a)yahoo.com> wrote:
Mark
the first link in my previous post says something contradictory to what
you
mentioned. I understand that one thread at a time can use the session just
not 2 or more threads at the same time . Is that what you meant too ?
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Multiple-threading-tp373159...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users