mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Remove Task
from the inner-most Import
method in RealmArchiveModelImporter
One of my pending work items for post-realm merge. The lowest-level import task is no longer asynchronous, as we don't want it to span multiple threads to allow easier interaction with realm. Removing the `Task` spec simplifies a heap of usages. Individual usages should decide whether they want to run the import asynchronously, by either using an alternative override or spooling up a thread themselves.
This commit is contained in:
@ -685,7 +685,7 @@ namespace osu.Game.Tests.Database
|
||||
[Test]
|
||||
public void TestImportWithDuplicateBeatmapIDs()
|
||||
{
|
||||
RunTestWithRealmAsync(async (realm, storage) =>
|
||||
RunTestWithRealm((realm, storage) =>
|
||||
{
|
||||
using var importer = new BeatmapModelManager(realm, storage);
|
||||
using var store = new RulesetStore(realm, storage);
|
||||
@ -718,7 +718,7 @@ namespace osu.Game.Tests.Database
|
||||
}
|
||||
};
|
||||
|
||||
var imported = await importer.Import(toImport);
|
||||
var imported = importer.Import(toImport);
|
||||
|
||||
Assert.NotNull(imported);
|
||||
Debug.Assert(imported != null);
|
||||
|
Reference in New Issue
Block a user