apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: [PATCH] WIN32 - fix apr_thread_join (PR: 28460) - v.2
Date Fri, 27 Aug 2004 19:24:01 GMT
Cliff Woolley wrote:

> On Fri, 27 Aug 2004, Mladen Turk wrote:
> 
> 
>>c) If thread_exit was never called before thread_join
>>    do not set the retval but rather return APR_INCOMPLETE.
> 
> 
> That's really what the unix impl does?

Probably not :)
Didn't test what happens if you call the thread_join
without ever calling thread_exit.

>  APR_INCOMPLETE was supposed to
> mean that partial results were returned but just not quite everything the
> caller asked for (as in the case of stat()ing a file but only getting back
> some of the information the user wanted rather than all).  Surely this is
> an error condition, right?  In that case, one of the APR_E* codes would be
> more appropriate.  Or maybe I'm not correctly understanding the situation
> you're describing...
> 

APR_INCOMLETE says :
The operation was incomplete although some processing
was performed and the results are partially valid

This rv can only happen if the code has been wrongly written,
meaning that the user didn't call the thread_exit inside the
thread func, but sill wishes to retrieve the thread exit
value using thread_join.

Because the thread handle is closed the operation is
incomplete, meaning: OK, I can close the thread, but
can not give you the thread's return value, cause you
never set that.

Anyhow, any error value will do as long as it makes sense :)

Regards,
MT.


Mime
View raw message