From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,550291bc2bbf5019,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-14 17:25:56 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!news-east.rr.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BA2A012.1C2A2903@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Multiple task bodies for one task type? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 15 Sep 2001 00:26:01 GMT NNTP-Posting-Host: 24.165.23.236 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1000513561 24.165.23.236 (Fri, 14 Sep 2001 17:26:01 PDT) NNTP-Posting-Date: Fri, 14 Sep 2001 17:26:01 PDT Xref: archiver1.google.com comp.lang.ada:13089 Date: 2001-09-15T00:26:01+00:00 List-Id: What's the normal Ada idiom for having multiple types of task in an array? Basically, I want a bunch of tasks where I can do something like tat : array (1..10) of mumble; ta : tat; begin -- "perform" is an entry or a protected procedure ta(1).perform(30); ta(2).perform(30); end and have the two calls execute different code. Generally, I want to write a framework where these tasks act something like callbacks, except I expect I'm going to want them to actually be tasks and protected objects (probably one of each). But it looks like each task type gets exactly one task body. Of course, the primary problem is that things like "accept" and "abort" and such have to actually be in the task body itself, not in subprograms called from the task body, or I'd just make (say) a generic with a procedure for each entry, or something. Any hints how one would go about this? Thanks in advance! -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. Those who work hard with few results always value hard work over getting results.