mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-15 17:10:51 -10:00
Ignore SynchronizationAttribute on MT
This commit is contained in:
1 parent
02482bef43
commit
93e31cbc63
1 file changed
+6
-6
@@ -371,17 +371,17 @@ namespace System.Threading
|
||||
bool release = false;
|
||||
try {
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
#if !MONOTOUCH
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
safe_wait_handle.DangerousAddRef (ref release);
|
||||
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), millisecondsTimeout, exitContext));
|
||||
} finally {
|
||||
#if !MONOTOUCH
|
||||
if (exitContext)
|
||||
SynchronizationAttribute.EnterContext ();
|
||||
#endif
|
||||
if (release)
|
||||
safe_wait_handle.DangerousRelease ();
|
||||
}
|
||||
@@ -407,9 +407,7 @@ namespace System.Threading
|
||||
bool release = false;
|
||||
try {
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
#if !MONOTOUCH
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
@@ -417,8 +415,10 @@ namespace System.Threading
|
||||
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), (int) ms, exitContext));
|
||||
}
|
||||
finally {
|
||||
#if !MONOTOUCH
|
||||
if (exitContext)
|
||||
SynchronizationAttribute.EnterContext ();
|
||||
#endif
|
||||
if (release)
|
||||
safe_wait_handle.DangerousRelease ();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user