comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthewjheaney@earthlink.net>
Subject: Re: Weird problem with recursion and tasks
Date: Sun, 03 Dec 2006 13:56:46 GMT
Date: 2006-12-03T13:56:46+00:00	[thread overview]
Message-ID: <ulklp9j6z.fsf@earthlink.net> (raw)
In-Reply-To: 1165116074.751484.99560@j44g2000cwa.googlegroups.com

"christopher.orihuela@gmail.com" <christopher.orihuela@gmail.com> writes:

>    protected body Counter is
>       Procedure ShowCounts is
>       begin
>          Put_Line("A: " & Integer'Image(A));
>          Put_Line("B: " & Integer'Image(B));
>       end ShowCounts;
>    end Counter;


Ada.Text_IO.Put_Line is a "potentially-blocking operation" so you should not
call it from a protected operation; be aware that Program_Error might get
raised here.  (Ada 2005 has a new feature whereby you can request the compiler
to detect that a potentially-blocking call was made and raise that exception.)



  parent reply	other threads:[~2006-12-03 13:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03  3:21 Weird problem with recursion and tasks christopher.orihuela
2006-12-03  8:34 ` Gautier
2006-12-03  9:43 ` Dmitry A. Kazakov
2006-12-03 13:56 ` Matthew Heaney [this message]
2006-12-05  0:50   ` Craig Carey <research@ijs.co.nz>
2006-12-03 21:10 ` christopher.orihuela
2006-12-04 20:09   ` christopher.orihuela
2006-12-05 11:38     ` Georg Bauhaus
2006-12-05 13:07       ` Dmitry A. Kazakov
2006-12-05 12:03   ` Ludovic Brenta
2006-12-05 12:24     ` Georg Bauhaus
2006-12-05 13:00       ` Ludovic Brenta
2006-12-05 20:37     ` christopher.orihuela
2006-12-05 22:16       ` christopher.orihuela
replies disabled

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