HEPCloud / decisionengine

HEPCloud Decision Engine framework
Apache License 2.0
6 stars 26 forks source link

Clarify timeout variable in block_while() #599

Closed mambelli closed 2 years ago

mambelli commented 2 years ago

The timeout in block_while(self, state, timeout=None) is for each wait_while() wait within the function, not for the whole function. I'm not sure if the caller would expect a global timeout for the whole block_while() function. In that case, the time spent in each wait should be subtracted from the timeout. Otherwise, the timeout for the function becomes timeout*#_of_workers. Either is OK. Check what the callers are expecting and add a docstring to remove ambiguity in the future.