| .0> What does the standard say about releasing resources
.0> from a joinable thread that doesn't explicitly call
.0> pthread_exit and no pthread_join is called?
Virtually nothing.
.0> BTW when I say resources I mean the stack.
OK, absolutely nothing.
The standard says that the exit value from the terminated thread is made
available to the joining thread; it leaves all the details of how that is
accomplished up to the implementation provider.
.1> if a joinable thread is not joined it resources will stay tied up until it
.1> is joined or the process dies.
After a thread terminates, many of its resources are freed, over time, whenever
possible, depending on which version of which operating system you are using.
However, if the thread is never joined with, and if it is never explicitly
detached, and if it was not created with the detached attribute, then some
amount of resources (memory) will be left tied up.
Why do you ask? (It seems like the DECthreads documentation, as well as
numerous notes in this conference, is pretty clear on this score...so what are
you trying to get at?)
Webb
|
| The standard says that, in order to release resources, you must JOIN or
DETACH a thread.
The standard does not REQUIRE that an implementation retain all resources
until JOIN or DETACH, however, and DECthreads does already release some
resources, as possible, once the thread has terminated. This may vary from
release to release as implementation needs vary, and we do not document or
support any such interpretation.
The standard says that, in order to release resources, you must JOIN or
DETACH a thread.
/dave
|