[Twisted-Python] deferred releasing too many tokens

Jonathan Vanasco twisted-python at 2xlp.com
Wed Sep 26 17:21:26 EDT 2012


thanks.  I'm going to try and reimplement with that right now!

On Sep 26, 2012, at 5:09 PM, Stephen Thorne wrote:

> This is a better way of using DeferredSemaphore:
>    def queue_thread( self , data=None ):
>        self.queued_data= data
>        return self.semaphoreService.run( self._T_to_thread )
> It handles acquisition and release for you. This will avoid any code
> path that might result in a double-release.

More information about the Twisted-Python mailing list