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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Timeouts in Ada Date: Mon, 21 Jul 2014 18:37:55 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <50bdb713-7ce1-411b-810b-9bdee1d26b7a@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1405985876 4908 69.95.181.76 (21 Jul 2014 23:37:56 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 21 Jul 2014 23:37:56 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:187775 Date: 2014-07-21T18:37:55-05:00 List-Id: "J-P. Rosen" wrote in message news:lq7uhv$vao$1@dont-email.me... > Le 17/07/2014 07:18, NiGHTS a écrit : >> I am looking at Ex. 10. >> >> task Password_Server is >> entry Check (User, Pass : in String; Valid : out Boolean); >> entry Set (User, Pass : in String); >> end Password_Server; >> ... >> User_Name, Password : String (1 .. 8); >> ... >> Put ("Please give your new password:"); >> Get_Line (Password); >> select >> Password_Server.Set (User_Name, Password); >> Put_Line ("Done"); >> or >> delay 10.0; >> Put_Line ("The system is busy now, please try again later."); >> end select; >> >> Now as an Ada beginner with a strong background in C/Asm I interpret >> this example in the following way... >> >> 1. "select" creates a thread which runs the body of "select" or the >> body of "or". Or maybe it creates two threads for each and blocks its >> own thread until one finishes. >> > [Rest snipped, since based on wrong assertion] > > Not at all! In Ada, one task=one thread, there are no hidden threads. Not true; ATC may need a hidden thread. But not here... (well, not unless the task supervisor itself uses a hidden thread, but that would probably exist during the life of the program). > This kind of select is called a timed entry call. Oops, you are right. For some reason, I thought this was an ATC. Ignore my previous response (unless you're thinking about ATC). Randy.