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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e52294beeef18a74,start X-Google-Attributes: gid103376,public From: "Gert Caspersen" Subject: GNAT DOS Delay Problems Date: 1997/09/26 Message-ID: <01bcca6e$e2e4f3c0$1601030a@lovina.cri.dk>#1/1 X-Deja-AN: 275984147 X-NNTP-Posting-Host: heimdal.cri.dk Organization: CRI A/S Newsgroups: comp.lang.ada Date: 1997-09-26T00:00:00+00:00 List-Id: When running the below program, no context switch takes place. Task T1 with the low priority is starved by task T2 with the high priority. In my opinion, T1 should be scheduled when T2 executes delay 10.0. However, this appears never to happen. Rather, the entire program is suspended for ten seconds. I am using GNAT version 3.07 for DOS. Any ideas of the cause would be appreciated.... with Ada.Text_IO; procedure Dims is task T1 is pragma Priority (2); end T1; task T2 is pragma Priority (3); end T2; task body T1 is begin -- T1 loop Ada.Text_IO.Put_Line("Task 1"); delay (1.0); end loop; exception when others => Ada.Text_IO.Put_Line("Task 1 got exception"); end T1; task body T2 is begin -- T2 loop Ada.Text_IO.Put_Line("Task 2"); delay (10.0); end loop; exception when others => Ada.Text_IO.Put_Line("Task 2 got exception"); end T2; begin -- Dims null; end Dims;