comp.lang.ada
 help / color / mirror / Atom feed
From: John McCabe <john@nospam.assen.demon.co.uk>
Subject: Re: Asyncronous call to task
Date: Thu, 06 Aug 2009 17:48:28 +0100
Date: 2009-08-06T17:48:28+01:00	[thread overview]
Message-ID: <rk1m755nq3bhggqk8l97svet7all0ou97m@4ax.com> (raw)
In-Reply-To: h5f042$86h$1@news.newsland.it

On Thu, 06 Aug 2009 18:24:34 +0200, la@la.com (Lisa Ansellotti) wrote:

>how can i call a entry in a task without block my main thread?

>i need to do something like this:

>in the main:
>
>task1.start;
>
>in the task:
>
>task body task1 is
>	begin	
>        accept start;
>        --return the control to the main thread but continue the task1 jobs

Once the accept statement completes the rendezvous is complete so the
main and task1 will continue independently. The only synchronous bit
is the rendezvous here; when the main calls the task1.start entry it
will wait until task1 is ready at the "accept start;" line.

If you were to do something like:

   accept start do
      blah...
   end start;

then called it from main, main would wait until the "end start" before
going on its merry way.

Hope this helps. If not, I've misunderstood your question.






      parent reply	other threads:[~2009-08-06 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 16:24 Asyncronous call to task Lisa Ansellotti
2009-08-06 16:38 ` Lisa Ansellotti
2009-08-06 16:51   ` John McCabe
2009-08-06 16:48 ` John McCabe [this message]
replies disabled

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