Use RWLock for pending requests, fixes #10