[Twisted-Python] DeferredSemaphore - action on acquire and release

Stephen Thorne stephen at thorne.id.au
Mon Feb 7 20:14:39 MST 2011


On 2011-02-07, Jason Rennie wrote:
> d = sem.acquire()
> d.addCallback(doSerialStuffAndRelease)

Shouldn't this be spelled:

d = sem.run(doSerialStuff)

Which does acquasition and release of the sempahore properly?

-- 
Regards,
Stephen Thorne
Development Engineer
Netbox Blue




More information about the Twisted-Python mailing list