test: factor out the "wait" logic in bookrace
The test is currently not testing the race it is supposed to test. The
synchronisation is still valid, but needs to run at a different point.
We start with extracting the synchronisation logic for clarity.
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: ForIndentation
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
IncludeCategories:
- Regex: '^<'
Priority: 1
- Regex: '^"'
Priority: 2