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
@@ -19,9 +19,8 @@ namespace Microsoft.Zune.Util
{
if (sm_radioStationManager == null)
{
try
{
Monitor.Enter(sm_lock);
lock (sm_lock)
{
if (sm_radioStationManager == null)
{
RadioStationManager radioStationManager = new RadioStationManager();
@@ -29,10 +28,6 @@ namespace Microsoft.Zune.Util
sm_radioStationManager = radioStationManager;
}
}
finally
{
Monitor.Exit(sm_lock);
}
}
return sm_radioStationManager;
}