comp.lang.ada
 help / color / mirror / Atom feed
* is_callable(environment)?
@ 1998-07-22  0:00 Tom Moran
  1998-07-22  0:00 ` is_callable(environment)? Robert Dewar
  1998-07-23  0:00 ` is_callable(environment)? Tucker Taft
  0 siblings, 2 replies; 5+ messages in thread
From: Tom Moran @ 1998-07-22  0:00 UTC (permalink / 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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-07-23  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-22  0:00 is_callable(environment)? Tom Moran
1998-07-22  0:00 ` is_callable(environment)? Robert Dewar
1998-07-23  0:00   ` is_callable(environment)? Jean-Pierre Rosen
1998-07-23  0:00   ` is_callable(environment)? Tom Moran
1998-07-23  0:00 ` is_callable(environment)? Tucker Taft

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