Hi.
In Kepler we have some actors which download large volume of data in the
background. They do this without any control from the director. In
essence this is done when the actor is instantiated and should complete
prior to the user running the workflow (ie, before initialize() is called).
I was looking at the problem we're having with ptexecute where these
workflows bomb because ptexecute does not know that it needs to wait
until the data is loaded before executing the workflow.
I was thinking of two different alternatives here. The first is to have
initialize() verify that the data download is complete and raise an
IllegalActionException if it is not complete. This provides feedback to
a real user when they press "go" too soon, but does not fix the problem
we have with ptexecute because it will just bomb when initialize() fails.
The other alternative is to have initialize() block until the data is
downloaded. This solves the ptexecute problem. The problem now is with
the UI. After a real user presses "go", the "stop" button does not
appear to do anything. I believe that stop does not attempt to
interrupt actors stuck in initialize().
I think the best solution overall, is to have the stop button actually
interrupt the workflow thread. The InterruptedException could be
trapped and converted into an IllegalActionException. Unfortunately,
such a change would very likely be deep in the guts of Ptolemy, and
could potentially have other unintended consequences. What do you think?
Kevin
----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list. Please send administrative
mail for this list to: [EMAIL PROTECTED]