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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no 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 06:08:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!oleane.net!oleane!teaser.fr!enst!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: time-slicing Date: Mon, 15 Jul 2002 08:07:10 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1026738482 67635 137.194.161.2 (15 Jul 2002 13:08:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 15 Jul 2002 13:08:02 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Original-Cc: janp9@gmx.net Xref: archiver1.google.com comp.lang.ada:27105 Date: 2002-07-15T08:07:10-05:00 Putting a delay statement (e.g. delay 0.02;) after each Put_Line statement will cause the task to yield the CPU for at least the specified time, thereby interleaving the tasks' execution. ----- Original Message ----- From: "Jan Prazak" Newsgroups: comp.lang.ada To: Sent: Monday, July 15, 2002 6:25 AM Subject: gnat: time-slicing > Hello, > > I have seen this example program in a tutorial: > > ------------ > 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; > --------------- > > The output is: > a > a > b > b > > But I want the output to be: > > ab > > ab > > (the tutorial says that this is the output with enabled time-slicing) > > I have tried to use -gnatT100, and -gnatT1, and pragma > Time_Slice(0.000001) etc., but none of this works. > I have gnat for Linux. > > Jan > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >