[rules-users] Multiple threading

Wolfgang Laun wolfgang.laun at gmail.com
Sat Feb 11 04:16:52 EST 2012


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 at 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-tp3731592p3733915.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120211/dd754bfa/attachment.html 


More information about the rules-users mailing list