You're right I was thinking of SwiftDonwloadImpl. I guess there is no other option than replacing it by an RLock.  
Alternatively, Elric was telling me that Twisted has a wrapper for communicating with subprocesses which is very nice. If we go with the Twisted route, then we could remove the requirement of endpoint.py getting the lock and reinstantiate the NoDispersyRLock.