Converted to lock blocks

This commit is contained in:
Yoshi Askharoun
2021-12-23 22:40:40 -06:00
parent 0502215213
commit 4e49c93747
26 changed files with 234 additions and 459 deletions
+2 -7
View File
@@ -17,9 +17,8 @@ namespace Microsoft.Zune.User
{
if (sm_instance == null)
{
try
{
Monitor.Enter(sm_lock);
lock (sm_lock)
{
if (sm_instance == null)
{
UserManager userManager = new UserManager();
@@ -27,10 +26,6 @@ namespace Microsoft.Zune.User
sm_instance = userManager;
}
}
finally
{
Monitor.Exit(sm_lock);
}
}
return sm_instance;
}