Title:
Clarification of process control
Description:
As it is declarfed in '9.7 process execution threads', task call does
not produce a new thread. The example in '9.8.1 Wait fork' could
mislead readers that the thread under the target of 'wait fork' are
only the threads forked under the task 'do_test'.
In reality (by following the thread creation cases in 9.7), if other
threads are created under this 'calling thread' before the call to
'do_test' task, those threads are also the target of 'wait fork'
execution. For example:
task call_do_test ;
fork
exec_0() ;
exec_1() ;
join_none
do_test() ;
endtask
task do_test ;
fork
exec_2() ;
exec_3() ;
join_none
wait fork ;
endtask
In such case, the threads created in 'call_do_test' task are also
target for 'wait fork' execution in 'do_test' task.
In order to block the target threads for 'wait fork', a new thread can
be created as:
task do_test ;
fork
fork
exec_2() ;
exec_3() ;
join_none
wait fork ;
join
endtask
This explanation needs to be placed in the specification. (Unless
there's a clear description that a task call creates a new thread.)
Received on Tue Aug 31 00:43:35 2004
This archive was generated by hypermail 2.1.8 : Tue Aug 31 2004 - 00:43:38 PDT