comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Composing tasks and protected objects
Date: Fri, 05 Aug 2005 21:20:43 +0200
Date: 2005-08-05T21:20:43+02:00	[thread overview]
Message-ID: <87u0i4xkac.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: wcchde4dyv4.fsf@shell01.TheWorld.com

* Robert A. Duff:

> But the same conditions in the entry call case do not imply that the
> called entry will never be triggered, because the called entry can be
> essentially anywhere, without regard to scopes and whatnot.
> 
>> In the queue example, you'd give up your subscription to that queue,
>> but this would be handled by a controlled object declared in the task,
>> I think.
>
> I don't understand what you mean here.

As you wrote, you can't be sure that there won't be any further
messages in the queue when the terminate alternative is selected.  In
general, you have to inform the sender about this, otherwise the queue
will eventually get stuck.  Therefore, in general, you need to notify
the queue about the lack of receivers.  Doing this with a controlled
object seems to be a natural choice because it would also work in the
presence of exceptions.

(As always, there might be some nasty deadlock issues lurking
somwhere. 8-)



  reply	other threads:[~2005-08-05 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05 17:26 Composing tasks and protected objects Florian Weimer
2005-08-05 17:49 ` Robert A Duff
2005-08-05 18:09   ` Florian Weimer
2005-08-05 18:26     ` Robert A Duff
2005-08-05 19:20       ` Florian Weimer [this message]
2005-08-07  1:27       ` Randy Brukardt
2005-08-08 21:55         ` Robert A Duff
2005-08-06  5:52 ` Jeffrey Carter
2005-08-08  9:52   ` Florian Weimer
2005-08-08 20:50     ` Randy Brukardt
2005-08-08 22:14       ` Robert A Duff
2005-08-06  9:01 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox