comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com (Tom Moran)
Subject: is_callable(environment)?
Date: 1998/07/22
Date: 1998-07-22T00:00:00+00:00	[thread overview]
Message-ID: <35b58fd0.21988014@SantaClara01.news.InterNex.Net> (raw)

An app has a library level task that would like to use a select with a
terminate alternative, but can't since the task must periodically poll
hardware via a delay alternative.  Using
ada.task_identification.is_callable as in
  main_program : task_id;
begin
  accept start_up do
     main_program := start_up'caller;
  end start_up;
...
  loop
     exit when not is_callable(main_program);
     select ...
appears to work on the three compilers I've tried so far, but I wonder
if I'm just very lucky, or if most compilers take the allowance of
C.7.1(21) and allow 'caller to return a task_id of the environment
task, and if is_callable on the environment task becomes false when it
reaches the end of the main program and before its dependent tasks
have terminated and library level controlled objects have finalized.




             reply	other threads:[~1998-07-22  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-22  0:00 Tom Moran [this message]
1998-07-22  0:00 ` is_callable(environment)? Robert Dewar
1998-07-23  0:00   ` is_callable(environment)? Tom Moran
1998-07-23  0:00   ` is_callable(environment)? Jean-Pierre Rosen
1998-07-23  0:00 ` is_callable(environment)? Tucker Taft
replies disabled

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