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-Thread: 103376,97f543c7a63b8839 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Composing tasks and protected objects References: <87iryk1eic.fsf@mid.deneb.enyo.de> In-Reply-To: <87iryk1eic.fsf@mid.deneb.enyo.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 06 Aug 2005 05:52:11 GMT NNTP-Posting-Host: 209.86.16.163 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1123307531 209.86.16.163 (Fri, 05 Aug 2005 22:52:11 PDT) NNTP-Posting-Date: Fri, 05 Aug 2005 22:52:11 PDT Xref: g2news1.google.com comp.lang.ada:3995 Date: 2005-08-06T05:52:11+00:00 List-Id: Florian Weimer wrote: > Suppose I want to write a selective accept which reads messages from a > queue, and also support a special entry call to reload the > configuration. You need all calls to go the same way. Right now you're trying to do something like +----------+ +----------+ +----------+ | | | | | | | Q |<--Get----| Server |<--Shut---| ? | | | | | Down | | | | | |<--Reload-| | | | | | | | +----------+ +----------+ +----------+ where arrows indicate direction of call. This won't work, but it will work if you can turn that call to Get around. For this, you need a forwarder between the Queue and Server: +----------+ +----------+ +----------+ +----------+ | | | | | | | | | Q |<-Get--| Forwarder|--Msg->| Server |<-Etc--| ? | | | | | | | | | +----------+ +----------+ +----------+ +----------+ Now your task can look like select accept Msg (Message : in ...) do Current_Message := Message; end Msg; Process_Message (Current_Message); or ... -- as in your example end select; The only difficulty is terminating the Forwarder. -- Jeff Carter "Go and boil your bottoms." Monty Python & the Holy Grail 01