fix deadlock in rare cases when injecting an asset (#441)
This commit is contained in:
parent
789b2f4e42
commit
d926133608
|
@ -7,6 +7,7 @@
|
|||
|
||||
* For modders:
|
||||
* Fixed error when accessing a mod-provided API whose underlying class is `internal`.
|
||||
* Fixed deadlock in rare cases when injecting a file with an asset loader.
|
||||
|
||||
* For SMAPI developers:
|
||||
* All mod assemblies are now rewritten in-memory to support features like mod-provided APIs.
|
||||
|
|
|
@ -792,12 +792,12 @@ namespace StardewModdingAPI.Framework
|
|||
{
|
||||
try
|
||||
{
|
||||
this.Lock.EnterReadLock();
|
||||
this.Lock.EnterWriteLock();
|
||||
return action();
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.Lock.ExitReadLock();
|
||||
this.Lock.ExitWriteLock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue