oooh!
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
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.
I'm in the process of rewriting a web spider (originally in twisted circa 2005)
, and keep running into an issue with deferreds releasing too many tokens.
i've been playing around with this all day, and can't seem to shake this
problem.
i'm guessing that i designed the application logic wrong