Re: [PHP4BETA] persistent connection api [was Re: [PHP4BETA] how does the ZTS work / where are the mutexes?]

From: Date: Wed, 18 Aug 1999 12:50:06 +0000
Subject: Re: [PHP4BETA] persistent connection api [was Re: [PHP4BETA] how does the ZTS work / where are the mutexes?]
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3539@lists.php.net to get a copy of this message
On Tue, 17 Aug 1999, Sasiha Schumann wrote: > > hmm, module writes should than consider to create their own "private" > > "global" persistent list - so we can do connection-pooling. i got most of > > that stuff already in place for oci8 (lucky me;-) - question is: do we > > want to create an API for things like this? - i think it would be a nice > > idea. > > Another suggestion for another API: Most modules handling > persistent connections contain almost the same code for handling > these resources. The API could be as simple as > > long acquire_resource(char *modname, char *key, void *(*create)(char *key)); > > Checks whether a resource with that specific `key' has already > been created in the namespace `modname.' > > If it does not exist, it calls the create function and passes > the key. The `void *' result of that is stored in a > persistent list. > > The function returns the list id of the stored entry. hi Sasiha;-) i like the api-idea - but what list-id are we talking about? zeev, as far as i can see it there's no such thing like a all threads global list, right? so what shoud we do? there's another problem: we might not be able to use the same persistent entry twice at the same time in 2 threads - so that needs to be taken care of. we could remove or lock the entry from the thread-global list for the time we use it (in the remove case put it back when the requst ends)? hmm tc > > -- > > Regards, > > Sascha Schumann > Consultant > > -- > PHP 4 Beta > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#3539) next »