Index: Include/Classes/System/Threading/WaitHandle.ab
===================================================================
--- Include/Classes/System/Threading/WaitHandle.ab	(revision 46)
+++ Include/Classes/System/Threading/WaitHandle.ab	(revision 47)
@@ -25,39 +25,39 @@
 	End Sub
 
-	Sub WaitOne()
-		WaitOne(INFINITE, FALSE)
-	End Sub
+	Function WaitOne() As BOOL
+		Return WaitOne(INFINITE, FALSE)
+	End Function
 
-	Sub WaitOne(millisecondsTimeout As Long, exitContext As BOOL)
-		WaitHandle.ExitThreadIfWaitIsFailed(WaitForSingleObject(h, millisecondsTimeout As DWord))
-	End Sub
+	Function WaitOne(millisecondsTimeout As Long, exitContext As BOOL) As BOOL
+		Return WaitHandle.AfterWait(WaitForSingleObject(h, millisecondsTimeout As DWord), 1)
+	End Function
 
-'	Sub WaitOne(timeout As TimeSpan, exitContext As BOOL)
+'	Function WaitOne(timeout As TimeSpan, exitContext As BOOL) As BOOL
 /*
-	Static Sub WaitAll(count As DWord, handles As *HANDLE)
-		WaitAll(count, handles, INFINITE, FALSE)
-	End Sub
+	Static Function WaitAll(count As DWord, handles As *HANDLE) As BOOL
+		Return WaitAll(count, handles, INFINITE, FALSE)
+	End Function
 
-	Static Sub WaitAll(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL)
-		WaitHandle.ExitThreadIfWaitIsFailed(WaitForMultipleObjects(count, handles, TRUE, millisecondsTimeout))
-	End Sub
+	Static Function WaitAll(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
+		Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, TRUE, millisecondsTimeout), count)
+	End Function
 
-'	Static Sub WaitAll(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL)
+'	Static Function WaitAll(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
 
-	Static Sub WaitAny(count As DWord, handles As *HANDLE)
-		WaitAny(count, handles, INFINITE, FALSE)
-	End Sub
+	Static Function WaitAny(count As DWord, handles As *HANDLE) As BOOL
+		Return WaitAny(count, handles, INFINITE, FALSE)
+	End Function
 
-	Static Sub WaitAny(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL)
-		WaitHandle.ExitThreadIfWaitIsFailed(WaitForMultipleObjects(count, handles, FALSE, millisecondsTimeout))
-	End Sub
+	Static Function WaitAny(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
+		Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, FALSE, millisecondsTimeout), count)
+	End Function
 
-'	Static Sub WaitAny(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL)
+'	Static Function WaitAny(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
 */
-	Static Sub SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle)
-		SignalAndWait(toSignal, toWaitOn, INFINITE, FALSE)
-	End Sub
+	Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle) As BOOL
+		Return SignalAndWait(toSignal, toWaitOn, INFINITE, FALSE)
+	End Function
 
-	Static Sub SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As BOOL)
+	Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As BOOL) As BOOL
 		Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") _
 			As *Function(hObjectToSignal As HANDLE, hObjectToWaitOn As HANDLE, dwMilliseconds As DWord, bAlertable As DWord) As DWord
@@ -67,8 +67,8 @@
 			ExitThread(0)
 		End If
-		ExitThreadIfWaitIsFailed(pSignalAndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord))
-	End Sub
+		Return AfterWait(pSignalAndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord), 1)
+	End Function
 
-'	Static Sub SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, timeout As TimeSpan, exitContext As BOOL)
+'	Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, timeout As TimeSpan, exitContext As BOOL) As BOOL
 
 ' Protected
@@ -82,10 +82,8 @@
 	h As HANDLE
 
-	Static Sub ExitThreadIfWaitIsFailed(ret As DWord)
+	Static Function AfterWait(ret As DWord, n As DWord) As BOOL
 		Select Case ret
-			Case WAIT_OBJECT_0
-				Exit Sub
 			Case WAIT_TIMEOUT
-				Exit Sub
+				Return FALSE
 			Case WAIT_ABANDONED
 				' Throw AbandonedMutexException
@@ -94,4 +92,7 @@
 			'Case WAIT_FAILED
 			Case Else
+				If WAIT_OBJECT_0 <= ret And ret < WAIT_OBJECT_0 + n Then
+					Return TRUE
+				End If
 				' ObjectDisposedException?
 				Debug
