You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Bojan Smojver <bo...@rexursive.com> on 2006/11/09 03:35:45 UTC

Re: Problems with DSOs and Pools

Quoting Garrett Rooney <ro...@electricjellyfish.net>:

> 2) Create yourself a global pool to load DSOs into, and do so early
> enough that it'll always be destroyed last.

We discussed some patches along those lines around the end of  
September. Would that be the approach that the list would approve? Or  
are there still issues with validity of the whole concept?

I'm asking because the patches I proposed only handled Unix stuff, so  
they would need to be corrected and expanded in order to be committed.  
No point doing this if the list thinks this is the wrong thing to do...

-- 
Bojan

Re: Problems with DSOs and Pools

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 11/9/06, Joe Orton <jo...@redhat.com> wrote:
> On Thu, Nov 09, 2006 at 01:35:45PM +1100, Bojan Smojver wrote:
> > Quoting Garrett Rooney <ro...@electricjellyfish.net>:
> >
> > >2) Create yourself a global pool to load DSOs into, and do so early
> > >enough that it'll always be destroyed last.
> >
> > We discussed some patches along those lines around the end of
> > September. Would that be the approach that the list would approve? Or
> > are there still issues with validity of the whole concept?
>
> I remain unconvinced ;)
>
> It is possible to use DSOs and pools together safely (c.f. httpd).  It
> is also possible to screw up pool heirarchies with any of the object
> types APR exposes; I do not see DSOs as "special" from that perspective.

I think they are special because there are more ways you can screw up
with them than with most pool based resources.  I think it's a valid
use case to want to have people use functions that came out of a DSO
and not have to explicitly know that it came out of a DSO, and these
days you basically HAVE to know that in order to get things right 100%
of the time.

-garrett

Re: Problems with DSOs and Pools

Posted by Bojan Smojver <bo...@rexursive.com>.
On Thu, 2006-11-09 at 10:26 +0000, Joe Orton wrote:

> I remain unconvinced ;)

OK, no worries.

-- 
Bojan


Re: Problems with DSOs and Pools

Posted by Joe Orton <jo...@redhat.com>.
On Thu, Nov 09, 2006 at 01:35:45PM +1100, Bojan Smojver wrote:
> Quoting Garrett Rooney <ro...@electricjellyfish.net>:
> 
> >2) Create yourself a global pool to load DSOs into, and do so early
> >enough that it'll always be destroyed last.
> 
> We discussed some patches along those lines around the end of  
> September. Would that be the approach that the list would approve? Or  
> are there still issues with validity of the whole concept?

I remain unconvinced ;)

It is possible to use DSOs and pools together safely (c.f. httpd).  It 
is also possible to screw up pool heirarchies with any of the object 
types APR exposes; I do not see DSOs as "special" from that perspective.  

It would be the same if you were saying: "Ah hey I screwed up the hash 
table pool heirarchies in my application so I need to make these hash 
tables allocate out of a global pool.  So can I add a special global 
pool to APR for hash tables and make apr_hash_make(NULL) use that pool?"  
"Ummm, no, fix your application" is still the appropriate answer.

joe