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=-0.3 required=5.0 tests=BAYES_00, 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 12:06:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!transit.news.xs4all.nl!131.211.28.48.MISMATCH!news.nl.linux.org!humbolt.nl.linux.org!surfnet.nl!newsfeed.sunet.se!news01.sunet.se!news.chalmers.se!legolas!nobody From: anders@legolas.gidenstam.org (Anders Gidenstam) Newsgroups: comp.lang.ada Subject: Re: time-slicing Date: Mon, 15 Jul 2002 21:05:58 +0200 Organization: Chalmers University of Technology Message-ID: References: Reply-To: anders@gidenstam.org (Anders Gidenstam) NNTP-Posting-Host: hotlips.cs.chalmers.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nyheter.chalmers.se 1026759964 13372 129.16.225.36 (15 Jul 2002 19:06:04 GMT) X-Complaints-To: abuse@chalmers.se NNTP-Posting-Date: 15 Jul 2002 19:06:04 GMT X-Newsreader: knews 1.0b.1 Xref: archiver1.google.com comp.lang.ada:27117 Date: 2002-07-15T19:06:04+00:00 List-Id: In article , Jan Prazak writes: > Maybe gnat doesn't even support time-slicing, but there is a command line > switch and also a pragma (but as I have said, both unfortunately don't > work). > But actually I don't need this at the moment, it was just a question. Hi, I think the time-slice is a lot longer than the time it takes to call Put_Line twice, so it is quite unlikely that you will get a task switch in the middle. The following small program may give you some idea on how much work your computer actually manages to do during one time-slice.. and it will also show whether your gnat installation does time-slicing or not. (I certainly expects it does, with the standard Ada runtime library for Linux tasks are mapped to Linux threads and those are time-sliced by default.) with Ada.Text_IO; procedure Task_Test is task type Writer (C : Character); task body Writer is begin loop Ada.Text_IO.Put (C); end loop; end Writer; A : Writer ('A'); B : Writer ('B'); begin null; end Task_Test; /Anders -- -------------------------------------------- "A well-written program is its own heaven; a poorly-written program is its own hell." - The Tao of Programming