comp.lang.ada
 help / color / mirror / Atom feed
From: "Rego, P." <pvrego@gmail.com>
Cc: mailbox@dmitry-kazakov.de
Subject: Re: Freezing a task
Date: Thu, 17 Nov 2011 17:23:55 -0800 (PST)
Date: 2011-11-17T17:23:55-08:00	[thread overview]
Message-ID: <32201299.75.1321579435782.JavaMail.geo-discussion-forums@yqbl36> (raw)
In-Reply-To: <mzm6z5dir1ee$.1b36kl4upye4x$.dlg@40tude.net>

>    Paused : Boolean := False;
> begin
>    loop
>       if Paused then
>          accept Release;
>          Paused := False;
>       else
>          select
>             accept Pause;
>             Paused := True;
>          else
>             ... -- Do stuff
>          end select;
>       end if;
>    end loop;

So I can use

Paused : Boolean := False;
begin
    accept Start;
    loop
       if Paused then
          accept Release;
          Paused := False;
       else
          select
             accept Pause;
             Paused := True;
          else
             ... -- Do stuff
          end select;
       end if;
    end loop;

and if I would want to add an abort entry? What should I do? 



  parent reply	other threads:[~2011-11-18  1:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 15:33 Freezing a task Rego, P.
2011-11-17 16:00 ` Simon Wright
2011-11-17 16:22   ` Dmitry A. Kazakov
2011-11-17 16:53     ` Dmitry A. Kazakov
2011-11-17 18:27     ` Simon Wright
2011-11-18  1:23     ` Rego, P. [this message]
2011-11-18  6:04       ` Jeffrey Carter
2011-11-18  8:47       ` Dmitry A. Kazakov
2011-11-18 10:05         ` Simon Wright
2011-11-18 11:41           ` Georg Bauhaus
2011-11-18 13:42             ` Dmitry A. Kazakov
2011-11-17 16:00 ` Dmitry A. Kazakov
2011-11-17 16:53   ` stefan-lucks
2011-11-17 17:08     ` Dmitry A. Kazakov
2011-11-17 17:13 ` Adam Beneschan
2011-11-17 18:01   ` AdaMagica
2011-11-18  1:22   ` Rego, P.
2011-11-17 17:34 ` Jeffrey Carter
2011-11-18  1:34   ` Rego, P.
2011-11-18  8:56     ` Dmitry A. Kazakov
2011-11-18  7:24 ` anon
2011-11-18 22:25   ` Anh Vo
2011-11-19  7:37     ` anon
2011-11-22  1:58   ` Rego, P.
replies disabled

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