Re: Thread query/init
John M May (johnmay@k2.llnl.gov)
Mon, 24 Feb 1997 10:56:58 -0800
Marc's proposal has a discussion point that asks if we need
an inquiry function that identifies the main thread. I think
that such a function is necessary at a minimum, and it would
be preferable to allow any thread to call the thread status
query function. The reason for this appears in Steve's
example of a library function that would like to use MPI:
Since the library has no way of knowing whether the thread
that called it is the MPI main thread, it cannot safely make
any MPI calls at all. Even if it could find out this information,
if library learns that it's not in the main thread, it can't
tell without calling the query function whether further MPI
calls would be safe (or if can safely spawn some more threads).
Therefore, I suggest that there be a function by which a
thread can learn if it's the main thread, and that the thread
status query function be callable by all threads.
John