Make joblib threadsafe