mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-15 17:10:51 -10:00
Ensure consistency when 'emitContext == true' is used in MONOTOUCH profile (since it won't work when the linker is enabled). Fix bug #1144
This commit is contained in:
1 parent
a8d733436c
commit
2ce9fc1b0e
2 files changed
+54
-8
No files matched your search
@@ -159,7 +159,13 @@ namespace System.Threading
|
||||
|
||||
public static bool Wait(object obj, int millisecondsTimeout, bool exitContext) {
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return Wait (obj, millisecondsTimeout);
|
||||
}
|
||||
finally {
|
||||
@@ -169,7 +175,13 @@ namespace System.Threading
|
||||
|
||||
public static bool Wait(object obj, TimeSpan timeout, bool exitContext) {
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return Wait (obj, timeout);
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -120,7 +120,13 @@ namespace System.Threading
|
||||
throw new ArgumentOutOfRangeException ("millisecondsTimeout");
|
||||
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return(WaitAll_internal(waitHandles, millisecondsTimeout, false));
|
||||
}
|
||||
finally {
|
||||
@@ -139,7 +145,13 @@ namespace System.Threading
|
||||
throw new ArgumentOutOfRangeException ("timeout");
|
||||
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return (WaitAll_internal (waitHandles, (int) ms, exitContext));
|
||||
}
|
||||
finally {
|
||||
@@ -169,7 +181,13 @@ namespace System.Threading
|
||||
throw new ArgumentOutOfRangeException ("millisecondsTimeout");
|
||||
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return(WaitAny_internal(waitHandles, millisecondsTimeout, exitContext));
|
||||
}
|
||||
finally {
|
||||
@@ -200,7 +218,13 @@ namespace System.Threading
|
||||
throw new ArgumentOutOfRangeException ("timeout");
|
||||
|
||||
try {
|
||||
if (exitContext) SynchronizationAttribute.ExitContext ();
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
return (WaitAny_internal(waitHandles, (int) ms, exitContext));
|
||||
}
|
||||
finally {
|
||||
@@ -346,8 +370,13 @@ namespace System.Threading
|
||||
|
||||
bool release = false;
|
||||
try {
|
||||
if (exitContext)
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
safe_wait_handle.DangerousAddRef (ref release);
|
||||
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), millisecondsTimeout, exitContext));
|
||||
} finally {
|
||||
@@ -377,8 +406,13 @@ namespace System.Threading
|
||||
|
||||
bool release = false;
|
||||
try {
|
||||
if (exitContext)
|
||||
if (exitContext) {
|
||||
#if MONOTOUCH
|
||||
throw new NotSupportedException ("exitContext == true is not supported");
|
||||
#else
|
||||
SynchronizationAttribute.ExitContext ();
|
||||
#endif
|
||||
}
|
||||
safe_wait_handle.DangerousAddRef (ref release);
|
||||
return (WaitOne_internal(safe_wait_handle.DangerousGetHandle (), (int) ms, exitContext));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user