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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.30.16 with SMTP id e16mr13243410ioe.22.1520336640174; Tue, 06 Mar 2018 03:44:00 -0800 (PST) X-Received: by 10.157.68.105 with SMTP id f38mr961750otj.1.1520336639984; Tue, 06 Mar 2018 03:43:59 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!e10no1721841itf.0!news-out.google.com!a2ni4288ite.0!nntp.google.com!e10no1721840itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 6 Mar 2018 03:43:59 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.217.2; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.217.2 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: some remarks and requests for confirmation on tasks and protected objects From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Tue, 06 Mar 2018 11:44:00 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 4790 X-Received-Body-CRC: 1398757466 Xref: reader02.eternal-september.org comp.lang.ada:50836 Date: 2018-03-06T03:43:59-08:00 List-Id: The same tutorial says, different names for the same overloaded entry, with= different profils are seen as distinct entries=E2=80=A6 What does that mea= n exactly=C2=A0? They still have the same queue/list of tasks waiting at th= e gate, right=C2=A0? Seems logical, but I ask for confirmation. > loop > select > when CONDITION1 > accept SERVICE=E2=82=81 (=E2=80=A6) do > end service=E2=82=81=C2=A0; > or > when condition=E2=82=82=09 > accept service2 (=E2=80=A6) do > end Service2=C2=A0; > or > delay P=C3=A9riode=C2=A0; > end select=C2=A0; > end loop=C2=A0; It is then impossible to make the server terminate other than through an ex= ternal termination. Is it still the case in Ada2012=C2=A0? Even I can tell you could well want = a task to took for termination (see that all other tasks of the same master= are terminated are aborted, and that the master has run out of statements = to execute) at each iteration, during 2 seconds, and if things are still ru= nning, iterate again. Delay alternative and terminate alternative still exc= lude each other=E2=80=A6 Is there another way to do the same=C2=A0? > if a server task is aborted, all calling tasks being served =C2=AB=C2=A0= tasking error=C2=A0=C2=BB. =3D> Wouldn=E2=80=99t it have been possible to have more=E2=80=A6 specific = exceptions when it comes to tasking=C2=A0? Like =C2=AB=C2=A0CALL_ON_ABORTED= _OR_TERMINATED_TASK_ERROR=C2=A0=C2=BB. =3D> for protected objects, what does the compiler knows what is =C2=AB=C2= =A0input/ouput=C2=A0=C2=BB, to forbid them in entries/protected subprograms= ? How does it differenciate such instructions (potentially blocking) from = other, since they are implemented through predefined libraries=C2=A0? =3D> About requeue=C2=A0: wouldn=E2=80=99t that be useful to be able to dit= ch at least in mode parameters=C2=A0? About the syntax for entry family index=C2=A0:=20 > entry_index_specification=C2=A0::=3D=C2=A0for=C2=A0defining_identifier=C2= =A0in=C2=A0discrete_subtype_definition or=C2=A0: entry REQUEST (for P in PRIORITY) (formal_parameters) when Condit= ion(P) is Hum=E2=80=A6 what=E2=80=99s that ? Why not using normal subprogram paramete= rs syntax, instead of something that looks like loop index specification, s= ince something like that procedure MAIN is type SPEED is (FAST, MEDIUM, SLOW, SNAIL); protected Selector is entry Answer_Query(SPEED)(Counter : INTEGER); end Selector; protected body selector is entry Answer_Query(for F in FAST..MEDIUM)(Counter : INTEGER) when TRU= E is begin Put("FAST Query made"); Put(Counter, 3); end; entry Answer_Query(for F in SLOW..SNAIL)(Counter : INTEGER) when TRUE= is begin Put("MEDIUM Query made"); Put(Counter, 3); end; end Selector; is not allowed anyway ? It could, if those intervals war made to be static,= or if the end of the end of the first and first of second interval, coinci= de. About impossibility to give different discriminants to tasks or protected t= ype objects=C2=A0: I thought about that before=E2=80=A6 The problem is, discriminants can be g= iven for limited records at initialization, which LOOKS like an affectation= , from the syntactic POV at least. But tasks are even more limited than tha= t, you can=E2=80=99t =C2=AB:=3D=C2=A0=C2=BB them at all. What about using the same syntax as with entry index specification=C2=A0: task type Selector is entry Answer_Query(SPEED)(Counter : INTEGER); end Selector; TASK_ARRAY: array (1..8) of SELECTOR(for P in 1..8, ANY_FUNCTION(P))=C2=A0; (I saw there are existing solutions, proposed by Barnes, but not as clean a= s that.