From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c24a60e907705f00,start X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: is_callable(environment)? Date: 1998/07/22 Message-ID: <35b58fd0.21988014@SantaClara01.news.InterNex.Net>#1/1 X-Deja-AN: 373770599 Organization: InterNex Information Services 1-800-595-3333 Newsgroups: comp.lang.ada Date: 1998-07-22T00:00:00+00:00 List-Id: 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.