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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!news.stack.nl!news.ecp.fr!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:34:22 -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 1405985662 4862 69.95.181.76 (21 Jul 2014 23:34:22 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 21 Jul 2014 23:34:22 +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:187774 Date: 2014-07-21T18:34:22-05:00 List-Id: "Simon Wright" wrote in message news:lyfvi0xy0w.fsf@pushface.org... > NiGHTS writes: > >> 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. > > No, there are probably only 2 threads here; the one running the code > that executes the select, and the server task. When ATC was designed for Ada 9x, we talked extensively about a 2 thread model as well as a 1 thread model. The rules are supposed to work for both. So the OP is correct, at least in the abstract. The two thread model has problems with exception handling, and as such is guaranteed to be pretty expensive. The one thread model is thus used more, but it is guaranteed to have problems on systems like Windows that don't allow interrupting system calls. Ergo, the best thing to do with ATC is to ignore that it exists. Randy.