At the moment DEFAULT_TIMEOUT is hardcoded to 10s and used in a number of operations that should complete almost immediately. It would be useful to make this a global settable value for those times where something is being slow and you need just a bit more time.
This could be implemented in a few ways:
Provide global setter and getter functions, and use the getter function wherever we use DEFAULT_TIMEOUT. Care is needed in functions that take DEFAULT_TIMEOUT as an argument, a sentinal value will be needed as the default, to be replaced by the value of the getter function when called
Make DEFAULT_TIMEOUT not a float, but a custom class that evaluates to a float when float(DEFAULT_TIMEOUT) or num + DEFAULT_TIMEOUT is called. At least __float__() and __add__() would need to be overridden to support this.
At the moment
DEFAULT_TIMEOUT
is hardcoded to 10s and used in a number of operations that should complete almost immediately. It would be useful to make this a global settable value for those times where something is being slow and you need just a bit more time.This could be implemented in a few ways:
DEFAULT_TIMEOUT
. Care is needed in functions that takeDEFAULT_TIMEOUT
as an argument, a sentinal value will be needed as the default, to be replaced by the value of the getter function when calledDEFAULT_TIMEOUT
not a float, but a custom class that evaluates to a float whenfloat(DEFAULT_TIMEOUT)
ornum + DEFAULT_TIMEOUT
is called. At least__float__()
and__add__()
would need to be overridden to support this.How much magic do we want here?
@tacaswell @prjemian @RAYemelyanova