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,5400c39557b9f344 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-09 14:18:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!enst.fr!not-for-mail From: Michal Nowak Newsgroups: comp.lang.ada Subject: Re: Multitasking Date: Mon, 09 Dec 2002 23:27:02 +0100 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <8bRwOT7FACB@lemmies.lb.bawue.de> <8bW1jK0+ACB@lemmies.lb.bawue.de> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT X-Trace: avanie.enst.fr 1039472283 35692 137.194.161.2 (9 Dec 2002 22:18:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 9 Dec 2002 22:18:03 +0000 (UTC) Return-Path: In-reply-to: <8bW1jK0+ACB@lemmies.lb.bawue.de> X-Mailer: Calypso Version 3.30.00.00 (3) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: vinnie@inetia.pl List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:31612 Date: 2002-12-09T23:27:02+01:00 On 2002-12-09 at 10:57 lemchens@lemmies.lb.bawue.de wrote: >>> If yes, what and how do i get them running independent? >> You did it. But what do you want to achieve with your code? > >I was thinking about a monitoring application, where the >monitored items would be monitored by different tasks and >the main task only runs in a loop, triggering the tasks >and getting the results. So i stumbled on this issue. > >Seems to be a better approach, to split the triggering/ >monitoring and the resultholding in two different tasks. It looks like a problem from real-time systems domain. You may have some monitoring tasks running in an infinite loop which read values from some device at constant time intervals. Next, they may place the values in a buffer (think of using protected objects for that purpose). These tasks should not be blocked by accepting entries or performing time-consuming operations (like console I/O). Create also a task which will read the values from buffer and do something with them (for example visualize them on the screen). Happy tasking, - Michal -- ----------------------------------------------------------------- -- ___ _ -- / _ \ | | I Choose Ada: -- | |_| | ___| | _____ The Most Trusted Name in Software (TM) -- | _ | | __ | | __ | -- |_| |_| |_____|_ |_____|_ http://www.adaic.org/whyada/choose.html -- -- -----------------------------------------------------------------