Open t3hmrman opened 1 year ago
More thoughts from reddit:
The big one I've seen is in tests, particularly of code where something happens in the background, and your tests have a pattern of "do X, wait for spawned task to complete, check Y". If you have a hardcoded wait it's either too short (so your tests are flaky) or too long (so your tests are slow), and something like situwaition works really well to let you wait exactly until the condition you're waiting for is true.
Thanks to rnottaken on Reddit for noting the lack of clarity in the documentation around the API, for example differences/distinction between
check_interval
andcooldown
.Conversation reproduced below:
I responded with:
To improve the documentation the following should be done:
cooldown
andcheck_interval
cooldown
tobackoff
(BackoffStrategy
might be a good enum to create)reqwest
) early in the documentation.