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=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c33f8f65997c21d0 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.242.66 with SMTP id wo2mr800569pbc.0.1348190090121; Thu, 20 Sep 2012 18:14:50 -0700 (PDT) Path: a8ni1715866pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Problem with task component Date: Wed, 19 Sep 2012 22:48:28 +0100 Organization: A noiseless patient Spider Message-ID: References: <1667b8e2qt7ei$.1gg1h3hrp9amz$.dlg@40tude.net> <187uk10m6z8xj.yr1cpbgrdur$.dlg@40tude.net> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="5f22ba276a4b4f77c63ae2949e7306f1"; logging-data="7341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XyTwag/MOrxfRugjamPdORTUiYbwm/QQ=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:WLD30XMMWr12PuruL69EVywhws0= sha1:Ge3Mf7RcktI8XkSVKtS8Gd59Rfw= Content-Type: text/plain Date: 2012-09-19T22:48:28+01:00 List-Id: "Dmitry A. Kazakov" writes: > You need an open terminate-alternative ("or terminate;") when the > object containing the task component is about to finalize. > > The usual problem is that the terminate-alternative does not live > together with the delay-alternative and/or else-part, which makes it > quite a challenge to implement something like a typical "driver" > component task: Indeed! This particular application detects discrete I/O changes (switch open/close) via an MCP23017 i/o multiplexer on a Raspberry Pi. Using interrupts is in the next phase, for now I'm just polling by reading the chip's registers so I must delay & can't use terminate. A pain.