comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: Purposes of Ada.Task_Identification
Date: 1999/06/24
Date: 1999-06-24T00:00:00+00:00	[thread overview]
Message-ID: <mDxc3.635$8n2.44111@typhoon-sf.snfc21.pbi.net> (raw)
In-Reply-To: 7ktva7$edh$1@nnrp1.deja.com

> I occasionally wonder what the intended purpose of the package
>Ada.Task_Identification is.
  It's sometimes handy for a resource locking routine to know if
the currect request in fact comes from the current owner of the
resource.  A comparison of the Id of the owner to that of the
requestor will answer that question.
  Some compilers will return True for Is_Callable(the environment task)
while the main program is running, and False after it has terminated
(and is waiting for child tasks to terminate).  I understand there's
an AI in the works to make this standard practice.  Where it works,
it allows a long-running task to detect that the program is trying
to stop, and to stop itself.  This handles situations where a
"select ... or terminate", or an abort, are inappropriate.
  Sometimes in debugging a multi-tasking system it's nice to be
able to log some activity and include in the log which task performed
that activity.
  That's just how I use Ada.Task_Identification.




  reply	other threads:[~1999-06-24  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-24  0:00 Purposes of Ada.Task_Identification Jim Rogers
1999-06-24  0:00 ` tmoran [this message]
1999-06-24  0:00 ` Tucker Taft
1999-06-24  0:00 ` Robert I. Eachus
replies disabled

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