Re: ATC, an example please.
- From: Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx>
- Date: 30 Jun 2005 08:55:27 -0400
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> writes:
> ATC transfers control, it does not abort any other task.
Well, it does abort any tasks inside the abortable region of the ATC.
The task in this example could be moved inside the ATC,
and then it would be aborted automatically.
But I was under the impression that the original poster wanted to abort
the processing inside the accept statement, and allow the task to loop
back and accept entry calls again.
I don't see the point of splitting into the Start and Ready entries,
since the caller isn't doing anything useful in between.
> N.B. This is a wrong way to do things. Don't use ATC if you cannot prove
> that there is no other way.
Yes. It is very difficult to program correctly when there are aborts
(which includes ATC) lurking in the program. If you call any
third-party code from an abortable place, you need to inspect
every line of it.
>... Don't abort task, which is even more brutal
> than ATC.
Not really. They both abort some code asynchronously,
and whatever variables are written by that code will be
destroyed in an unpredictable manner. The issues are
the same for aborting a task as they are for aborting
the abortable part of an ATC.
Storage leaks are another issue with aborts (both kinds).
- Bob
.
- Follow-Ups:
- Re: ATC, an example please.
- From: Dmitry A. Kazakov
- Re: ATC, an example please.
- References:
- ATC, an example please.
- From: e.coli
- Re: ATC, an example please.
- From: Dmitry A. Kazakov
- ATC, an example please.
- Prev by Date: Re: How to byte swap an IEEE Float?
- Next by Date: Re: How difficult is ada to learn?
- Previous by thread: Re: ATC, an example please.
- Next by thread: Re: ATC, an example please.
- Index(es):
Relevant Pages
|