comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: On-Screen Elapsed Time Display?
Date: Mon, 14 Oct 2002 23:05:09 GMT
Date: 2002-10-14T23:05:09+00:00	[thread overview]
Message-ID: <F4Iq9.40358$Fz.111407@rwcrnsc51.ops.asp.att.net> (raw)
In-Reply-To: 7NGq9.19522$T_.457776@iad-read.news.verio.net

Some comments:
  Look into using a "protected type" instead of semaphores.  It may
be more efficient and it's certainly safer.  For instance, consider
what would happen in your program if Set_Time_Window(Time_String);
raised, but didn't handle, an exception.
  Area.Time is a variable accessed by two different tasks.  Could that
cause any problems, say if one task updated Area.Time in the middle of
the other task's usage of it?  Possibly access to Area.Time also needs
to be controlled via a protected type.
  You said Set_Time_Window updates the screen with the new time.
What then does Update_Screen do?
  It's a good idea to have the "single file" sections as short as
possible.  Every place your program writes to the screen will have to
be surrounded by semaphores (or use the protected type).  It's simpler,
and less prone to error, if the synchronization is done inside the
write-to-screen routines, rather than by each of their callers.



  reply	other threads:[~2002-10-14 23:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11 18:54 On-Screen Elapsed Time Display? Dr Nancy's Sweetie
2002-10-11 19:32 ` Jeffrey Carter
2002-10-14 21:36   ` Dr Nancy's Sweetie
2002-10-14 23:05     ` tmoran [this message]
2002-10-16  1:45       ` Dr Nancy's Sweetie
2002-10-15 19:23   ` Dr Nancy's Sweetie
replies disabled

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