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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9138bc72eca8fee X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Ada Tasks and Keyboard I/O Date: 1997/06/14 Message-ID: <1997Jun14.081514.1@eisner>#1/1 X-Deja-AN: 248335037 X-Nntp-Posting-Host: eisner.decus.org References: <33A12825.1C80@onlink.net> X-Nntp-Posting-User: KILGALLEN X-Trace: 866290521/5545 Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-06-14T00:00:00+00:00 List-Id: In article <33A12825.1C80@onlink.net>, "David H. Haley" writes: > I have developed a software package in Ada and thought it would be nice > to have the time perodically updated on the screen while waiting for the > user to input a value from the keyboard. > > This "sounds" easy enough to do using tasks; however, once the program > reaches the Get(My_Number) statement all other tasks come to a grinding > halt waiting for this keyboard I/O to occur . >From an Ada perspective, your task with the "Get" is still computing. Some compilers support pragma TIME_SLICE to alleviate this for equal priority tasks, depending on operating system constraints. > Any ideas how I can accomplish the requirement in para 1 ? I am using > Meridian OpenAda Dos ver 4.1.4, an ADA 83 compiler. ^^^ Your program must be doing what the operating system views as asynchronous I/O, so if you insist on DOS it may be that you must use an add-on OS extender that makes it behave less like DOS. Some Ada compilers come with such extenders. Larry Kilgallen