Only lock database for the duration of a model restoration

This commit is contained in:
smoogipoo 2019-10-03 11:23:21 +09:00
parent c85d7c8b3f
commit f8eb07b211

View File

@ -436,8 +436,6 @@ namespace osu.Game.Database
int i = 0; int i = 0;
using (ContextFactory.GetForWrite())
{
foreach (var item in items) foreach (var item in items)
{ {
if (notification.State == ProgressNotificationState.Cancelled) if (notification.State == ProgressNotificationState.Cancelled)
@ -450,7 +448,6 @@ namespace osu.Game.Database
notification.Progress = (float)i / items.Count; notification.Progress = (float)i / items.Count;
} }
}
notification.State = ProgressNotificationState.Completed; notification.State = ProgressNotificationState.Completed;
} }