
Quoting [Tom Goodale] (Aug 25 2005):
On Wed, 17 Aug 2005, Andre Merzky wrote:
Hi all,
the wait currently throws a NotRunning exception if the tast is not running anymore. That basically mean that _every_ wait has to be put into a try/catch, since the programmer does not know in advance if the task is still active.
The can do a getState on the task.
You have a race condition then: state = task.getState (); # task finishes now if ( state == Running ) { task.wait (-1.0); # throws an NotRunning exception } So that does not help.
We would like to propose to change that behaviour, and just return immediately on wait, even if it is called multiple times. A NotRunning exception should only be thrown if the task was cancelled before.
or if the task has not been run. Basically we need an exception in any case that the wait can return but the output arguments of the task are invalid.
Right. That would be a good policy.
The same should hold for the TaskContainer.
Yep.
Tom
Cheers, Andre. -- +-----------------------------------------------------------------+ | Andre Merzky | phon: +31 - 20 - 598 - 7759 | | Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 | | Dept. of Computer Science | mail: merzky@cs.vu.nl | | De Boelelaan 1083a | www: http://www.merzky.net | | 1081 HV Amsterdam, Netherlands | | +-----------------------------------------------------------------+