1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-19 19:00:30 +08:00
Files
osu-lazer/osu.Game/Database
T
Dean Herbert 567e9f33a9 Fix thread safety of realm Refresh operation
Due to the lack of locking, there was a chance the the update thread
`context` was retrieved just before the `flushContexts` call, followed
by `.Refresh()` being run while the blocking behaviour was invoked.

This can be seen in test failures such as
https://ci.appveyor.com/project/peppy/osu/builds/39859786/tests.

As an aside, I tried multiple different methods to avoid `lock()` on the
update thread but they felt flaky. The overhead of lock when there's no
contention is reportedly around 30-50ns, so likely not of concern. We
can address it at a later point if it becomes one.
567e9f33a9 · 2021-07-04 16:24:43 +09:00
History
..
2020-12-19 10:36:27 +01:00
2020-12-08 12:52:34 +09:00