comp.lang.ada
 help / color / mirror / Atom feed
* Asyncronous call to task
@ 2009-08-06 16:24 Lisa Ansellotti
  2009-08-06 16:38 ` Lisa Ansellotti
  2009-08-06 16:48 ` John McCabe
  0 siblings, 2 replies; 4+ messages in thread
From: Lisa Ansellotti @ 2009-08-06 16:24 UTC (permalink / raw)


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

or 

in the main

task1.start (with a parameter that runs the task1.start asyncronously)



thank you


-- 

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Asyncronous call to task
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Lisa Ansellotti @ 2009-08-06 16:38 UTC (permalink / raw)


i solved, thanks.


-- 

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Asyncronous call to task
  2009-08-06 16:24 Asyncronous call to task Lisa Ansellotti
  2009-08-06 16:38 ` Lisa Ansellotti
@ 2009-08-06 16:48 ` John McCabe
  1 sibling, 0 replies; 4+ messages in thread
From: John McCabe @ 2009-08-06 16:48 UTC (permalink / raw)


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.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Asyncronous call to task
  2009-08-06 16:38 ` Lisa Ansellotti
@ 2009-08-06 16:51   ` John McCabe
  0 siblings, 0 replies; 4+ messages in thread
From: John McCabe @ 2009-08-06 16:51 UTC (permalink / raw)


On Thu, 06 Aug 2009 18:38:33 +0200, dasda@dasda.com (Lisa Ansellotti)
wrote:

>i solved, thanks.

I was in the middle of my reply when I got interrupted, which is why
it arrived after this message.

FWIW - would my reply have been of any use?




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-06 16:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox