comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: asynchronous task communication
Date: Mon, 31 Dec 2012 12:18:48 -0800 (PST)
Date: 2012-12-31T12:18:48-08:00	[thread overview]
Message-ID: <1c4c3de6-a261-443b-bf23-05a97f974b6a@googlegroups.com> (raw)
In-Reply-To: <7NednS4s2oukfXzNnZ2dnUVZ_oadnZ2d@earthlink.com>

On Monday, December 31, 2012 12:52:22 PM UTC-6, Charles Hixson wrote:
> Thank you for your answer.
> 
> The problem with that solution is that I've been advised that I 
> shouldn't have many more tasks than available cores, and that uses 2 of 
> my available 6.  True, several clients could use the same postmaster, 
> but it's still too resource intensive.

I'm rather dubious of this advice -- without any reasoning it reeks of the "premature optimization" problem.

Besides, unless you're making it for a specific [homogenized] computer platform (I.E. the PlayStation 2) there's no guarantee that the user will have the same set-up... further, it restricts you to your particular computer. (I recently got a new computer, which has a different number of cores than my old one... I would not like to be compelled to recompile my programs because of such a minor difference.)


> It's looking more and more like protected objects on the heap are the 
> best answer.  I just wasn't sure that a built-in answer didn't exist.

Protected objects are pretty nice, so are the Containers (w/ the generalized for-loop). But if it's something that logically maps well to TASK, there's no reason to avoid TASK -- that is, conform your code to the problem, not to the details of the executing computer.

> OTOH, actual non-blocking (i.e. asynchronous) calls to either threads or 
> protected items is what I really need.

Ada can do it; I don't have my books available, but I believe asynchronous select is covered in both:
http://www.amazon.com/Building-Parallel-Embedded-Real-Time-Applications/dp/0521197163/ref=sr_1_2?ie=UTF8&qid=1356984746&sr=8-2&keywords=Ada+Parallel+programming
and
http://www.amazon.com/Concurrent-Real-Time-Programming-Ada-ebook/dp/B001GS6TBO/ref=sr_1_3?ie=UTF8&qid=1356984746&sr=8-3&keywords=Ada+Parallel+programming

Or just go to the RM:
 http://www.ada-auth.org/standards/12aarm/html/AA-9-7-4.html

> These other things are make-shift kludges.  They centralize control that should be distributed. 

Hm, then should you be looking at the DSA? -- Or is that a different 'distributed' than you are talking about?



  reply	other threads:[~2012-12-31 20:18 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-31  0:16 asynchronous task communication Charles Hixson
2012-12-31  9:04 ` Simon Wright
2012-12-31 11:49   ` Simon Wright
2012-12-31 10:50 ` J-P. Rosen
2012-12-31 12:09 ` Georg Bauhaus
2012-12-31 18:52   ` Charles Hixson
2012-12-31 20:18     ` Shark8 [this message]
2012-12-31 21:09     ` Niklas Holsti
2012-12-31 22:15       ` Randy Brukardt
2013-01-01  3:58         ` Charles Hixson
2013-01-01  4:48           ` tmoran
2013-01-01 17:59             ` Charles Hixson
2013-01-01  3:51       ` Charles Hixson
2013-01-01  9:59         ` Dmitry A. Kazakov
2013-01-01 10:38         ` Brian Drummond
2013-01-01 12:32         ` Jeffrey Carter
2013-01-01 18:21           ` Charles Hixson
2013-01-01 18:54             ` Robert A Duff
2013-01-02  7:36               ` Charles Hixson
2013-01-02  9:55                 ` Dmitry A. Kazakov
2013-01-02 19:02                   ` Charles Hixson
2013-01-02 20:35                     ` Dmitry A. Kazakov
2013-01-03  0:20                       ` Charles Hixson
2013-01-03  6:34                         ` Charles Hixson
2013-01-03  8:50                         ` Dmitry A. Kazakov
2013-01-03 19:01                           ` Charles Hixson
2013-01-03 10:01                         ` J-P. Rosen
2013-01-03 19:29                           ` Charles Hixson
2013-01-04  8:17                             ` J-P. Rosen
2013-01-05  4:31                               ` Charles Hixson
2013-01-09  8:34                                 ` Stephen Leake
2013-01-03 22:27                         ` Randy Brukardt
2013-01-05  5:18                           ` Charles Hixson
2013-01-05  8:48                             ` Niklas Holsti
2013-01-06 22:55                               ` Charles Hixson
2013-01-07  0:38                                 ` tmoran
2013-01-07  6:07                                 ` Shark8
2013-01-07 10:49                                 ` Brian Drummond
2013-01-07 18:27                                   ` Jeffrey Carter
2013-01-08 12:02                                     ` Brian Drummond
2013-01-08 17:12                                       ` Jeffrey Carter
2013-01-08 18:18                                         ` Simon Wright
2013-01-08 20:29                                           ` Dmitry A. Kazakov
2013-01-08 21:01                                           ` Jeffrey Carter
2013-01-08 21:14                                             ` Simon Wright
2013-01-08 22:11                                               ` Randy Brukardt
2013-01-08 22:52                                               ` Jeffrey Carter
2013-01-08 22:26                                         ` Brian Drummond
2013-01-08  2:41                             ` Randy Brukardt
2013-01-02 22:43         ` Niklas Holsti
2013-01-03  1:30           ` Charles Hixson
2013-01-03 12:11             ` Georg Bauhaus
2013-01-03 13:17               ` Dmitry A. Kazakov
2013-01-05 20:19               ` Charles Hixson
2013-01-07  4:01                 ` Shark8
2013-01-01 19:59     ` J-P. Rosen
replies disabled

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