diff options
author | Michael Spencer <bigcheesegs@gmail.com> | 2024-02-13 18:35:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 18:35:39 -0800 |
commit | edff3ff4d37a9e051e33146393b064ce987af252 (patch) | |
tree | 0c0b0a82324ad4a0b4bf6a2502ca77917b3545c5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 22d2f3aa3097feb9a91c6d7b8ef611a1cde6d0d5 (diff) | |
download | llvm-edff3ff4d37a9e051e33146393b064ce987af252.zip llvm-edff3ff4d37a9e051e33146393b064ce987af252.tar.gz llvm-edff3ff4d37a9e051e33146393b064ce987af252.tar.bz2 |
[llvm][Support] Add ExponentialBackoff helper (#81206)
This provides a simple way to implement exponential backoff using a do
while loop.
Usage example (also see the change to LockFileManager.cpp):
```
ExponentialBackoff Backoff(10s);
do {
if (tryToDoSomething())
return ItWorked;
} while (Backoff.waitForNextAttempt());
return Timeout;
```
Abstracting this out of `LockFileManager` as the module build daemon
will need it.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions