From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns.
Date: Wed, 1 May 2013 21:41:35 -0700 (PDT)
Date: 2013-05-01T21:41:35-07:00 [thread overview]
Message-ID: <0a444657-4d36-480d-b05b-026bfa6b15cb@googlegroups.com> (raw)
In-Reply-To: <klsih1$qhd$1@munin.nbi.dk>
On Wednesday, May 1, 2013 8:20:07 PM UTC-6, Randy Brukardt wrote:
> "Shark8" wrote in message
>
> news:e0c67da2-159a-4a37-b199-1d80312f6aca@googlegroups.com...
> ...
> >> Delay
> >> also causes context switching. When you use null statement the main task
> >> likely to manage to create all contestant before any of them gains the
> >> processor (depending on OS settings and number of cores available).
>
> >I have four cores; that shouldn't be a problem though -- I'm using the
> >protected
> >object to manage my text-output debugging.
>
>
> But doing that is a Bounded_Error (see 9.5.1(8-18), and specifically
> paragraph 18).
I thought I remembered something about it being questionable/implementation-defined if it would work as expected -- but it did work on the initial experiment (which was actually on tasks w/ discriminants).
> It of course might work as you intend (that's one of the possible results),
*nod*
> but its something you should avoid in code unless you never, ever expect to
> run it on a different Ada compiler.
Right.
> To do this correctly, you have to use a lock object, typically wrapped in a
> controlled object so that initialization does the locking and finalization
> does the unlocking (that way you don't have to worry about abort or
> exceptions screwing up your locking). I'll leave the code needed as an
> exercise for the OP. :-)
I see. I've been putting off getting into finalization... oh, hey, what about tasks as fields of records...
;)
next prev parent reply other threads:[~2013-05-02 4:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 18:27 Interresting difference in Normal-Returns/Expression-Functions and Extended-Returns Shark8
2013-04-22 19:13 ` Dmitry A. Kazakov
2013-04-22 20:11 ` Shark8
2013-04-23 6:15 ` Simon Wright
2013-04-23 7:35 ` Stephen Leake
2013-04-23 8:58 ` Dmitry A. Kazakov
2013-05-02 2:20 ` Randy Brukardt
2013-05-02 4:41 ` Shark8 [this message]
2013-04-23 6:32 ` egilhh
2013-04-23 15:24 ` Adam Beneschan
2013-04-24 5:56 ` egilhh
2013-04-24 14:40 ` Adam Beneschan
2013-04-25 5:30 ` egilhh
2013-04-25 5:41 ` Shark8
2013-04-23 16:00 ` Adam Beneschan
2013-04-23 16:52 ` Simon Wright
2013-04-23 17:57 ` Adam Beneschan
2013-04-25 8:48 ` egilhh
2013-04-25 15:19 ` Adam Beneschan
2013-05-02 2:33 ` Randy Brukardt
2013-05-02 2:38 ` Randy Brukardt
2013-05-02 16:15 ` Adam Beneschan
2013-05-02 22:00 ` Randy Brukardt
2013-05-03 1:11 ` Adam Beneschan
2013-05-03 5:34 ` Simon Wright
2013-05-03 6:43 ` egilhh
2013-05-03 16:49 ` Adam Beneschan
2013-05-03 23:09 ` Randy Brukardt
2013-04-23 23:00 ` Shark8
2013-04-23 23:16 ` Adam Beneschan
2013-05-02 2:28 ` Randy Brukardt
2013-05-02 16:37 ` Adam Beneschan
2013-04-23 16:33 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox