restore setmaxinflight; drop unused mutex
Merge pull request #46 from jehiah/set_max_inflight_46

restore SetMaxInFlight dropped in refactoring