From: Gautier write-only <gautier_niouzes@hotmail.com>
Subject: Re: Q: Stopping a task running a long simulation
Date: Thu, 11 Mar 2010 17:15:16 -0800 (PST)
Date: 2010-03-11T17:15:16-08:00 [thread overview]
Message-ID: <60e4fd81-fd8b-4ea0-972a-95237f0c36ff@j27g2000yqn.googlegroups.com> (raw)
In-Reply-To: hnc1k8$3uq$1@speranza.aioe.org
On 12 mar, 01:24, tmo...@acm.org wrote:
> > 'Compute' has a generic 'Feedback' procedure for showing progress.
> > I could with that way give a Boolean, user_abort, to 'Feedback', and
> > 'Compute' would stop when an ad-hoc exception is raised, and return
> > normally on its own.
>
> Think of a motor and its control panel. The panel does read-only access
> to certain information in the motor, its speed for instance, which the
> panel displays. The panel can also write certain information, like Stop,
> to a switch that the motor periodically (every rotation?) checks. Compute
> is your motor and the GUI is the control panel. Progress information
> is regularly written by Compute to a record, which is periodically
> read by the GUI, and control information is written as needed by the
> GUI and regularly read by Compute.
Thanks - it is a perfect metaphore. And be reassured, I have no
trouble programming this. My question is: would you recommend that way
(have a mechanism to tell the motor to stop) in order to have a chance
in a reasonable time to stop the "runner daemon" task in its turn ? I
am tempted to do so. I was just exploring possibilities of stopping
the daemon and the motor in a direct and less polite way, but still
good Ada practice.
Gautier
next prev parent reply other threads:[~2010-03-12 1:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 13:08 Q: Stopping a task running a long simulation Gautier write-only
2010-03-11 18:11 ` Anh Vo
2010-03-12 0:24 ` tmoran
2010-03-12 1:15 ` Gautier write-only [this message]
2010-03-12 1:27 ` Adam Beneschan
2010-03-12 1:50 ` Gautier write-only
2010-03-12 2:03 ` Gautier write-only
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox