comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Running a background task
Date: Thu, 15 May 2008 16:14:40 -0700 (PDT)
Date: 2008-05-15T16:14:40-07:00	[thread overview]
Message-ID: <30aa0151-5dc0-4f1a-8e9c-c9a949a2b72b@p39g2000prm.googlegroups.com> (raw)
In-Reply-To: 760f4092-577e-440e-9fef-fb3ff3389560@h1g2000prh.googlegroups.com

On May 15, 3:31 pm, Adam Beneschan <a...@irvine.com> wrote:
> On May 15, 1:51 pm, Bender <Jeffrey.S.Morri...@gmail.com> 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



  reply	other threads:[~2008-05-15 23:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15 20:51 Running a background task Bender
2008-05-15 22:31 ` Adam Beneschan
2008-05-15 23:14   ` Adam Beneschan [this message]
2008-05-16  0:43   ` Bender
2008-05-16 15:25     ` Adam Beneschan
2008-05-16 15:29       ` Adam Beneschan
2008-05-16  0:16 ` Jeffrey R. Carter
2008-05-16  0:49   ` Bender
2008-05-16  4:32     ` Jeffrey R. Carter
2008-05-16 14:34       ` Bender
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox