patron threading utilities