RE: [PHP-DEV] GDLib/reentrant

From: Date: Sat, 12 Sep 1998 23:48:52 +0000
Subject: RE: [PHP-DEV] GDLib/reentrant
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-1016@lists.php.net to get a copy of this message
> > GD is awefully useful and it would be sad to lose it > completely in PHP > > 3.1. Could we not stick a lock around these functions and > > only allow one > > thread into them at any one time? > > > The only thing > that will realy fix it in a useful way is to make gdlib thread safe. > Eventualy, if someone else doesn't get to it, I might. The Ok, I took a quick look, and realized there was an easy way to make gd reentrant. Because all the gdlib api functions require a pointer to a gd image structure (except those that create it) it was easy to add a structure to that that holds all the globals. That way, we pass all the globals around with the image structure. This took a couple hours work to implement, but now I have it...a reentrant gdlib. This should work on unix as well, and with all existing programs that use gdlib, as it doesn't change the api at all. If someone can run this through the wringer, that would be greate. I ran the test programs that come with gd, without problem. I've cvs'd rgd.zip into the 3.0 tree under the extra directory. Shane -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#1016) next »