As seen recently, it is quite easy in our semi-`async` world to
accidentally cause a deadlock in the TPL thread pool. The cause of this
is a `.Wait()` or `.Result` from within an already `async` context.
Finding these cases by reading code is quite hard, as they can be nested
multiple calls deep. Likewise, I couldn't find an existing analyser that
finds such cases (and to some it is considered a non-issue as the thread
pool should grow to add new threads when it gets in this state - but for
us this can take too long).
This is a proposal to replace all calls with a custom method with added
safety. Note that this PR will intentionally fail as it points out the
issues that are fixed in https://github.com/ppy/osu-framework/pull/4973.
The rationale for this change was that I couldn't cover all cases in
osu! side `TestMultiplayerClient` by reading the code alone.