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,651d9b748faab5c6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 04 Aug 2005 15:54:45 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <42f22d52$1_1@glkas0286.greenlnk.net> Subject: Re: Newbie: Code isn't executed Date: Thu, 4 Aug 2005 15:57:48 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-GWJCBaTgO+J+LQW2paWUYzqB5K/wT3xoNYBWitKeo7RMhfKlTR/gVdpW4djdEOBywKGfsuvIjYDt0VS!DCXR1UWwmWI0rwpaZwBMMWjCygSPnQknZK+MWqQh/6HWplViK8DetY2lVSOBwz2At+92XogUYxZf X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:3970 Date: 2005-08-04T15:57:48-05:00 List-Id: wrote in message news:Ht6dndDMFPbLz2_fRVn-uQ@comcast.com... > >Also, sharing Total between the tasks is poor, it should be a protected > >object. > Worse, suppose Peter checks Total while Susan is dining with Michael. > Peter finds Total = 1 so he tries to rendezvous with Susan. But Susan, > on returning from dinner, decrements Total, finds it to be zero, > prints statistics, and goes away. Leaving poor Peter still trying to > rendezvous. This sounds like the real world.... > You need a way for Peter and Michael to tell that Susan has gone away > and they should stop calling. Anything that involves "find out if Susan > is taking calls, and if so call her" will fail if she leaves in the > interval between test and call. Since dinner is a time-limited event, > they could use a select with timeout. If she hasn't responded within a > reasonable time, they can give up. ...and so does this. [Giving up, that is, seems to be my primary condition when dating...] (Sorry, not much to do with Ada! :-) Randy.