comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Newbie: Code isn't executed
Date: Thu, 4 Aug 2005 15:57:48 -0500
Date: 2005-08-04T15:57:48-05:00	[thread overview]
Message-ID: <S_KdnV3hrfwIHW_fRVn-qA@megapath.net> (raw)
In-Reply-To: Ht6dndDMFPbLz2_fRVn-uQ@comcast.com

<tmoran@acm.org> 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.






  reply	other threads:[~2005-08-04 20:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-04 14:10 Newbie: Code isn't executed Thomas Ruschival
2005-08-04 14:47 ` Ed Falis
2005-08-04 14:48 ` Egil Høvik
2005-08-04 15:07 ` Martin Dowie
2005-08-04 17:37   ` tmoran
2005-08-04 20:57     ` Randy Brukardt [this message]
2005-08-05  6:11       ` Vinzent 'Gadget' Hoefler
2005-08-06  3:52         ` tmoran
2005-08-04 20:20   ` Simon Wright
2005-08-04 15:09 ` Martin Dowie
2005-08-04 16:37 ` SOLVED: " Thomas Ruschival
2005-08-05  2:43 ` Steve
2005-08-06  5:33   ` Jeffrey Carter
replies disabled

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