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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63360011f8addace X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-15 07:56:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.86.7.162!newsfeed.wirehub.nl!news.tiscali.nl!bnewspeer01.bru.ops.eu.uu.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!news.york.ac.uk!not-for-mail From: Ian Broster Newsgroups: comp.lang.ada Subject: Re: time-slicing Date: Mon, 15 Jul 2002 15:56:51 +0100 Organization: The University of York, UK Sender: ib104@york.ac.uk Message-ID: <20020715155651.394e6c42.spam@broster.co.uk> References: NNTP-Posting-Host: pc095.cs.york.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: pump1.york.ac.uk 1026745009 12882 144.32.41.96 (15 Jul 2002 14:56:49 GMT) X-Complaints-To: abuse@york.ac.uk NNTP-Posting-Date: 15 Jul 2002 14:56:49 GMT X-Newsreader: Sylpheed version 0.7.5claws (GTK+ 1.2.10; i686-pc-linux-gnu) Xref: archiver1.google.com comp.lang.ada:27110 Date: 2002-07-15T14:56:49+00:00 List-Id: > Putting a delay statement (e.g. delay 0.02;) > > ------------ > > with Ada.Text_IO; use Ada.Text_IO; > > > > procedure Task_Demo is > > task A; > > task body A is > > begin > > Put_Line("b"); > > Put_Line("b"); > > end A; > > begin > > Put_Line("a"); > > Put_Line("a"); > > end Task_Demo; > > --------------- Relying on assumptions about scheduling decisions generally a bad idea- it may work on a minimal program, but it's very fragile. Change something else and you have no guarantees of what might happen. If you need to ensure synchronisation, use some synchronisation mechanisms like a rendezvous or a protected object. ian