Re: libevent wrapper

From: Date: Fri, 28 Nov 2008 06:59:11 +0000
Subject: Re: libevent wrapper
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5930@lists.php.net to get a copy of this message
On Thursday 27 November 2008 16:10:52 Antony Dovgal wrote: > On 23.11.2008 23:02, Arnaud Le Blanc wrote: > > I was sitting at pecl/event doing some "cvs update" :] > > Do you want some help on the new wrapper ? > > JFYI: I committed an initial version of the extension. > See http://cvs.php.net/pecl/libevent/ > > At the moment it supports only basic and event_buffer API. > Feel free to play with it and let me know if you find any problems. Great :) I just found a problem when an event resource is deleted while the callback is called (event_free() allows that). It is possible to change the internal callback functions so that they do not need to use the the possibly freed memory after the call. This also makes them simpler by not attempting to avoid freeing the resources. The same problem applies for buffer and loop resources. I made a patch for that [1] (for loops I had to add a counter of attached events and to fail in event_base_free() when the counter is > 0). It also removes the TSRMLS_FETCH()s and some typos. [1] http://arnaud.lb.s3.amazonaws.com/libevent.patch Regards, Arnaud

« previous php.pecl.dev (#5930) next »