Changeset 408
- Timestamp:
- Feb 21, 2008, 8:48:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Threading/WaitHandle.ab
r388 r408 29 29 30 30 ' Methods 31 Virtual Sub WaitHandle() 32 End Sub 31 33 32 34 Virtual Sub ~WaitHandle() 33 Dispose()35 This.Dispose() 34 36 End Sub 35 37 36 38 Virtual Sub Close() 37 Dispose()39 This.Dispose() 38 40 End Sub 39 41 … … 53 55 End Function 54 56 55 ' Function WaitOne(timeout As TimeSpan, exitContext As BOOL) As BOOL 56 /* 57 Static Function WaitAll(count As DWord, handles As *HANDLE) As BOOL 57 Function WaitOne(timeout As System.TimeSpan, exitContext As Boolean) As Boolean 58 Return WaitHandle.AfterWait(WaitForSingleObject(h, timeout.TotalMilliseconds() As DWord), 1) 59 End Function 60 61 Static Function WaitAll(count As DWord, handles As *HANDLE) As Boolean 58 62 Return WaitAll(count, handles, INFINITE, FALSE) 59 63 End Function 60 64 61 Static Function WaitAll(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As B OOL) As BOOL65 Static Function WaitAll(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As Boolean) As Boolean 62 66 Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, TRUE, millisecondsTimeout), count) 63 67 End Function 64 68 65 ' Static Function WaitAll(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL 69 Static Function WaitAll(count As DWord, handles As *HANDLE, timeout As System.TimeSpan, exitContext As Boolean) As Boolean 70 Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, TRUE, timeout.TotalMilliseconds() As DWord), count) 71 End Function 66 72 67 Static Function WaitAny(count As DWord, handles As *HANDLE) As B OOL73 Static Function WaitAny(count As DWord, handles As *HANDLE) As Boolean 68 74 Return WaitAny(count, handles, INFINITE, FALSE) 69 75 End Function 70 76 71 Static Function WaitAny(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As B OOL) As BOOL77 Static Function WaitAny(count As DWord, handles As *HANDLE, millisecondsTimeout As Long, exitContext As Boolean) As Boolean 72 78 Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, FALSE, millisecondsTimeout), count) 73 79 End Function 74 80 75 ' Static Function WaitAny(timeout As TimeSpan, handles As *HANDLE, millisecondsTimeout As Long, exitContext As BOOL) As BOOL 76 */ 81 Static Function WaitAny(count As DWord, handles As *HANDLE, timeout As System.TimeSpan, exitContext As Boolean) As Boolean 82 Return WaitHandle.AfterWait(WaitForMultipleObjects(count, handles, FALSE, timeout.TotalMilliseconds() As DWord), count) 83 End Function 84 77 85 Static Function SignalAndWait(toSignal As WaitHandle, toWaitOn As WaitHandle) As Boolean 78 86 Return SignalAndWait(toSignal, toWaitOn, INFINITE, FALSE) 79 87 End Function 80 88 81 Public 89 Static Function SignalAndWait (toSignal As WaitHandle, toWaitOn As WaitHandle, timeout As System.TimeSpan, exitContext As Boolean) As Boolean 90 Return SignalAndWait(toSignal, toWaitOn, timeout.TotalMilliseconds() As Long, FALSE) 91 End Function 92 82 93 Static Function SignalAndWait(toSignal As WaitHandle, toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As Boolean) As Boolean 83 94 Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") As Detail.PFNSignalObjectAndWait … … 88 99 End Function 89 100 90 ' Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, timeout As TimeSpan, exitContext As BOOL) As BOOL 91 92 ' Protected 93 Sub WaitHandle() 94 End Sub 101 Public 102 Function WaitTimeout() As Long 103 Return WAIT_TIMEOUT 104 End Function 95 105 96 106 Protected
Note:
See TracChangeset
for help on using the changeset viewer.