civisanalytics / civis-python

Civis API Python Client
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

Clarified exception behavior of futures #297

Closed aripollak closed 5 years ago

aripollak commented 5 years ago

It was a bit surprising to me that the documentation treated concurrent.futures.wait the same as futures.result(), but the former doesn't raise an exception and the latter does. Maybe there's a better solution than this, but I thought I'd at least add some clarification.

aripollak commented 5 years ago

Thanks, updated with your suggestions. Would it also be useful to show a more concrete example of why someone would want to use concurrent.futures.wait, like using it with a timeout or custom return_when with multiple futures? Or would that be more confusing?

aripollak commented 5 years ago

There's already documentation about it in the Python standard library, so it might just help to be more explicit that our CivisFuture is not an idiosyncratic Civis API client thing.

Okay, I think that's already pretty explicit in this file, so I won't add anything else.