From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3e11ef4efc073f6b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r15g2000prh.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: requeue with abort and timed call Date: Tue, 30 Dec 2008 13:33:51 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <2a60b044-6a5c-4ce6-93e6-6eeefc8806c3@l33g2000pri.googlegroups.com> <1f6rcb1qwt7vx.1mckzyk9ucohf.dlg@40tude.net> <84c56781-1cb1-4d86-be14-e66fc9fdade6@w1g2000prk.googlegroups.com> <7p8onuvzdz18$.1m1dq8n3b52q5.dlg@40tude.net> <9j9ajg.3a7.ln@hunter.axlog.fr> <2a0a1de3-6736-4478-9378-50b8895fa20d@r15g2000prh.googlegroups.com> NNTP-Posting-Host: 62.49.19.209 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1230672831 1016 127.0.0.1 (30 Dec 2008 21:33:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 30 Dec 2008 21:33:51 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r15g2000prh.googlegroups.com; posting-host=62.49.19.209; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4110 Date: 2008-12-30T13:33:51-08:00 List-Id: On Dec 30, 9:25=A0am, Jean-Pierre Rosen wrote: > sjw a =E9crit : > > The whole example is far from clear to me. If I were reviewing this > > design I would have great difficulty understanding what the designer > > was trying to do and whether the code achieved it. > > Sure, this is only an example to show an issue and demonstrate a problem. > In real life, you wouldn't have seconds, but micro-seconds. Would be > much more difficult to experiment with. My problem is rather more with the idea of doing work in the accept of size comparable with the caller's permissible waiting period *and then* requeueing. > > The decision to requeue ought to be speedy. Requeue because you can't > > deal with it now; don't ponder for 3 seconds and then decide to > > requeue for a further arbitrary period. > > Once again, the problem is not with the 3s. Could be much shorter. See above. > > > If the code said > > > =A0 =A0 =A0 =A0 =A0accept Original_Call do > > =A0 =A0 =A0 =A0 =A0 =A0 Put_Line ("Original Call..."); > > =A0 =A0 =A0 =A0 =A0 =A0 delay 3.0; > > =A0 =A0 =A0 =A0 =A0 =A0 Put_Line ("Original Call Done"); > > =A0 =A0 =A0 =A0 =A0end Original_Call; > > > ie without the requeue, the timed entry call would not be cancelled, > > because we're abort-deferred. > > You are confusing things here, this has nothing to do with > abort-deferral. Abort-deferral means that the called task cannot be > aborted while engaged in a rendezvous. Timed entry call is about the > caller being removed from the queue if the delay expires before the > rendezvous has started. > > > So a caller design which relies on the > > callee having/not having a requeue is broken. > > No. A timed entry call means: "if the server does not arrive within XX > seconds, I give up". Requeue (with abort) allows the server to get the > request, inspect the parameters, and decide that this request cannot be > serviced now and put it back on wait. This is transparent as seen from > the client's side. OK, I was confused about abort-deferral. Not the first time. But if it is to be "transparent from the client's side", then it would be reasonable for it to make no difference to the behaviour as seen by the caller whether or not there is a requeue in the internals of the callee. It's legitimate (well, no one has said it's wrong) for the caller to be delayed well past its timed entry limit if there is a lot of processing in the accept and no requeue. What about 1 timed entry starts 2 original entry accepted 3 requeued 4 requeued entry started 5 timed entry expires but has no effect 6 requeued work continues for a significant period >From the outside, you would be hard put to distinguish this from the case where 4 & 5 were reversed, I think.