apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Doane <ddo...@opendemand.com>
Subject Re: apr_psprintf thread safe?
Date Fri, 09 Jan 2004 02:55:53 GMT
The following comment is from apr_lib.h:

 * apr_vformatter does not call out to any other code, it is entirely
 * self-contained.  This allows the callers to do things which are
 * otherwise "unsafe".  For example, apr_psprintf uses the "scratch"
 * space at the unallocated end of a block, and doesn't actually
 * complete the allocation until apr_vformatter returns.  apr_psprintf
 * would be completely broken if apr_vformatter were to call anything
 * that used a apr_pool_t.  Similarly http_bprintf() uses the "scratch"
 * space at the end of its output buffer, and doesn't actually note
 * that the space is in use until it either has to flush the buffer
 * or until apr_vformatter returns.

Cliff Woolley wrote:

>Where does it say that?  httpd uses it extensively, so if it's not, I'd
>tend to think we'd have noticed by now...
>
>--Cliff
>
>
>On Thu, 8 Jan 2004, Donald Doane wrote:
>
>  
>
>>Okay, will do that, but it's called in
>>"flood_easy_reports::easy_process_stats()" and it seems APR
>>documentation implies it is not thread safe.
>>
>>We use a modified version of "flood_easy_reports" and I'd like to
>>confirm whether or not its use is truly thread safe.
>>
>>Geoffrey Young wrote:
>>
>>    
>>
>>>Donald Doane wrote:
>>>
>>>
>>>      
>>>
>>>>Can someone please confirm whether or not "apr_psprintf" is thread safe.
>>>>
>>>>Thank you.
>>>>
>>>>
>>>>        
>>>>
>>>sorry, wrong list.  try dev@apr.apache.org.
>>>
>>>--Geoff
>>>
>>>
>>>
>>>
>>>      
>>>
>>    
>>
>
>  
>


Mime
View raw message