Edward A. Lee wrote:
At 08:41 AM 1/30/2006 -0600, Kevin Ruland wrote:
Also, if some actor somewhere does do something extremely time consuming in it's initialize method, there is currently no pleasant way to interrupt it. The user can click on the stop button, and it does appear to have some effect -- that is, it's indentation changes when pressed -- however, it does not interrupt the processing. This behavior could be considered a but itself. Either the stop button needs to be disabled until it can do something useful, or it should stop the workflow regardless of its execution state.

Every Director has a method isStopRequested().
A long running initialize() method should just call this method
and abort if it returns true...


Edward,

I think I can use this in some kind of spin wait. What's the easiest way for an actor get a handle to it's director?

I did a little digging and noticed that Manager.finish() does a notifyAll(). Presumably I could tap into this as well and synchronize on the Manager object. Of course, I need to get my hands on the Manager, and there might be a different deadlock situation present.

Thanks much.

Kevin
I would be circumspect about adding additional phases.
It could significantly increase the complexity for actor writers.

Edward



------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal


----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to