> Hi!
>
> In reply to my own email from yesterday - To fix this issue the
>
> setShapeSize and
> setShapeProperty methods in
> org.jmol.viewer.ModelManager
>
> need to be declared as synchronized.
> If this is correct, could somebody with write permission commit this to
> cvs?

Andreas,

Your analysis is correct ... in that there is a race condition caused by
multiple threads.

Evaluation runs as a separate thread ... but I am sure that there are a
large number of race conditions that occur when a second string is sent
for evaluation while the first is still executing.

You recommended:
> setShapeSize and
> setShapeProperty methods in
> org.jmol.viewer.ModelManager
>
> need to be declared as synchronized.

Unfortunately, I do not think that is sufficient. There are a large number
of methods that are at the same level. So, I do not think that marking
these as synchronized will be sufficient.

The fundamental problem is with evalString and the implementation of Eval.
When a new string is presented it does not queue the string for execution.

In addition, it looks like to me that there is not even a predicate to
test whether or not there is something that is still evaluating.

I apologize ... for me, it is quite embarrassing. This is a problem that I
have known about for several years. But I think you are the first person
to raise it as an issue.

For now, you should only send a single string to be executed.

A good solution to this problem is non-trivial. To help you with your
immediate issue, I will add a predicate so that you can test whether or no
the eval engine is still running. I will also try to add another entry
point that will queue strings to be evaluated.

Let's keep talking.


Miguel



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to