apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bray <Tim.B...@Sun.COM>
Subject Maybe global_mutex breakage isn't a problem
Date Sat, 04 Oct 2008 19:52:56 GMT
On Oct 3, 2008, at 1:55 PM, Tim Bray wrote:

> Good question.  Let me present the problem at a high level.  There's  
> a file that is regularly refreshed, and I only want one request  
> handler rebuilding it at a time, because otherwise there are lots of  
> horrible race conditions.   I don't know whether I'm in worker or  
> prefork mode.  So I simply want to serialize update of this file,  
> and I thought apr_global_mutex_* was a good way to do this.  Is  
> there a better way?  -Tim

Um, maybe I'm an idiot.  There is after apr_file_lock(), which seems  
made to order.  Just because I was thinking "mutex" didn't mean I  
actually needed one.


View raw message