mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
fix: Moving SafeCriticalSection Enters outside of tryf block, don't want to Leave if the Enter fails
This commit is contained in:
parent
aae8bc5323
commit
602f170091
1 changed files with 4 additions and 2 deletions
|
|
@ -13,9 +13,10 @@ namespace ICD.Common.Utils
|
|||
if (callback == null)
|
||||
throw new ArgumentNullException("callback");
|
||||
|
||||
Enter();
|
||||
|
||||
try
|
||||
{
|
||||
Enter();
|
||||
callback();
|
||||
}
|
||||
finally
|
||||
|
|
@ -35,9 +36,10 @@ namespace ICD.Common.Utils
|
|||
if (callback == null)
|
||||
throw new ArgumentNullException("callback");
|
||||
|
||||
Enter();
|
||||
|
||||
try
|
||||
{
|
||||
Enter();
|
||||
return callback();
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue