Skip to content

Commit 57d5ee8

Browse files
committed
DEBUG: add timeout to realm retrieval
This is a TEMPORARY measure to hopefully help diagnose deadlocks of `OnlineCachingAssetStore` on single-thread CI runs. I am unable to reproduce those deadlocks locally despite almost an hour of debug test runs in various configurations. I can reproduce *other* tests deadlocking, but on nothing seemingly related to this one new class.
1 parent ad4e6ed commit 57d5ee8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

osu.Game/Database/RealmAccess.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ private Realm getRealmInstance()
778778
// Ensure that the thread that currently has the `realmRetrievalLock` can retrieve nested contexts and not deadlock on itself.
779779
if (!currentThreadHasRealmRetrievalLock.Value)
780780
{
781-
realmRetrievalLock.Wait();
781+
realmRetrievalLock.Wait(10000);
782782
currentThreadHasRealmRetrievalLock.Value = true;
783783
tookSemaphoreLock = true;
784784
}

0 commit comments

Comments
 (0)