Make thread limits configurable