[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: BeanShell Thread Safety



Pat,

Sounds good, but, sorry, what is an "AST"? Thanks. 

Chuck. 

PS: Any idea on when the next release will roll out? Eagerly awaiting
:-) Thanks, again.

-----Original Message-----
From: pat [mailto:pat@pat.net]
Sent: Tuesday, August 01, 2000 10:56 AM
To: Irvine, Chuck R.
Cc: pat
Subject: Re: BeanShell Thread Safety


On Mon, Jul 31, 2000 at 10:08:01AM -0500, Chuck Irvine wrote:
> I am using BeanShell in a multi threaded application so it is
important
> for me to understand BeanShell thread safety. I find nothing on this
> subject in BeanShell documentation. Your help in better understanding
> this is appreciated!

BeanShell should be safe for concurrent execution within one interpreter

(without any explicit locking). The ASTs shouldn't store any volatile 
infomation in instance variables.

It has to be this way because bsh methods may be invoked by multiple
threads
started within the interpreter and asynchronously by external events.

That said, I have not done any extensive testing of this and it wasn't 
actually a priority in the design.. it just happened naturally.  I will
be looking more closely at this in the future.


Thanks,
Pat