This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Kawa fails if used in multithreading
On 07/30/2010 04:28 AM, Daniele Benegiamo wrote:
I've seen you are currently working on Kawa servlet. Should not this
problem make also the Kawa servlet implementation fails? All servlet
containers works with thread pools, if two requests for a new page (I
still don't know if the problem is in parsing/compiling/evaluation) come
at the same time, the container would execute Kawa as in the posted
example. Have you ever tried a stress test of Kawa servlet (e.g. with
'JMeter' or 'ab')?
No I haven't. Though note the issue appears to be with multiple
invocations of the compiler at the same time. Mostly you'd only
re-compile a web page script (or servlet) when the code changes, which
you normally wouldn't do. The problem you're seeing is because you're
doing multiple compiles at once - something I would normally discourage.
There are some shared data structures when compiling. Most specifically,
the cache of ClassType instances (generated using reflection). I'm
trying to figure out where there might be missing "synchronized" or
other problems. I've found some questionable cases, but I don't
have it fixed yet.
--
--Per Bothner
per@bothner.com http://per.bothner.com/