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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3abdc4d72c0b7e9d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!p39g2000prm.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Running a background task Date: Thu, 15 May 2008 16:14:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: <30aa0151-5dc0-4f1a-8e9c-c9a949a2b72b@p39g2000prm.googlegroups.com> References: <760f4092-577e-440e-9fef-fb3ff3389560@h1g2000prh.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1210893280 4148 127.0.0.1 (15 May 2008 23:14:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 15 May 2008 23:14:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p39g2000prm.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:85 Date: 2008-05-15T16:14:40-07:00 List-Id: On May 15, 3:31 pm, Adam Beneschan wrote: > On May 15, 1:51 pm, Bender wrote: > > > Hi, I'm pretty new to Ada, and need to figure out a way to kick off a > > background task that runs more or less forever, while normal execution > > of the program continues. > > > Thus far I've figured out how to create a task and start it, but the > > procedure calling it requires the task to finish before continuing > > on. I'm sure I just must be using the wrong mechanisms, but I can't > > really figure out the answer. > > When Handle_Msg calls on the On_String entry, this starts a > rendezvous, and Handle_Msg stops when the rendezvous is done. That should be "Handle_Msg stops until the rendezvous is done". Sorry. > Since > the "accept" has a "do" part, the rendezvous will not be done until > the "do" completes, which in your case never happens. Thus, > Handle_Msg will never proceed past the entry call. -- Adam