Theoretically safer due to avoiding a potential data race (change in
`leasedInProgress` between the time of the check and start of schedule
execution).
Improves reliability by being fail-safe in case of multiple returns,
which can happen if the operation tracker is part of a screen being
exited (as is the case with its current primary usage in multiplayer).
While this was already being enforced inside of `CheckForResult`, the
internal tracking values of rotation were still being incremented as
long as the `DrawableSpinner` was present. This resulted in incorrect
SPM values being displayed if a user was to start spinning before the
object's `StartTime`.
Kind of annoying to write a test for (there's no setup for spinners yet)
but am willing to do so if that is deemed necessary.
Closes https://github.com/ppy/osu/issues/11600.
It turns out the SQLite API isn't smart enough to handle nullables
directly, so we need to help it out a bit.
Stops the following from being thrown:
```
System.InvalidOperationException: Value must be set.
at Microsoft.Data.Sqlite.SqliteParameter.Bind(sqlite3_stmt stmt) = 3
at
at Microsoft.Data.Sqlite.SqliteParameterCollection.Bind(sqlite3_stmt
stmt) = 3 at
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior
behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at
osu.Game.Beatmaps.BeatmapManager.BeatmapOnlineLookupQueue.checkLocalCache(BeatmapSetInfo
set, BeatmapInfo beatmap) in
/Users/dean/Projects/osu/osu.Game/Beatmaps/BeatmapManager_BeatmapOnlineLookupQueue.cs:line
166 = 166
```
Importantly, this removes the call to CatchUnobservedExceptions(), which was
outright incorrect (awaiting on the wrong task as a result) in the
original test code.
It turns out we may still want to use TaskChain for its locking
behaviour, so I've made it internally use the refactored version I
implemented, while keeping the general structure.