Changeset 237 for Include/Classes/System/Threading
- Timestamp:
- May 7, 2007, 4:22:52 PM (18 years ago)
- Location:
- Include/Classes/System/Threading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Threading/Thread.ab
r234 r237 52 52 End Sub 53 53 54 Sub Thread(hThread As HANDLE, dwThreadId As DWord,dummy As Long)54 Sub Thread(hThread As HANDLE, dwThreadId As DWord, dummy As Long) 55 55 m_hThread=hThread 56 56 m_dwThreadId=dwThreadId … … 61 61 62 62 63 Function Equals( thread As Thread ) As Boolean 64 If m_dwThreadId = thread.m_dwThreadId Then 65 Return True 66 End If 67 Return False 68 End Function 69 70 63 Function Equals(thread As Thread) As Boolean 64 Return m_dwThreadId = thread.m_dwThreadId 65 End Function 71 66 72 67 '----------------------- … … 74 69 '----------------------- 75 70 71 76 72 'Priority Property 77 73 Sub Priority(value As ThreadPriority) … … 87 83 Return m_dwThreadId 88 84 End Function 85 89 86 90 87 … … 314 311 315 312 'カレントスレッドを取得 316 Function CurrentThread(ByRef obj_Thread As Thread) As B OOL313 Function CurrentThread(ByRef obj_Thread As Thread) As Boolean 317 314 Dim dwNowThreadId As DWord 318 315 dwNowThreadId=GetCurrentThreadId() … … 322 319 If ppobj_Thread[i]->ThreadId=dwNowThreadId Then 323 320 obj_Thread.Thread(ByVal ppobj_Thread[i]) 324 Return 1325 End If 326 Next 327 328 Return 0321 Return True 322 End If 323 Next 324 325 Return False 329 326 End Function 330 327 -
Include/Classes/System/Threading/WaitHandle.ab
r119 r237 63 63 64 64 Static Function SignalAndWait(ByRef toSignal As WaitHandle, ByRef toWaitOn As WaitHandle, millisecondsTimeout As Long, exitContext As BOOL) As BOOL 65 Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") _66 As *Function(hObjectToSignal As HANDLE, hObjectToWaitOn As HANDLE, dwMilliseconds As DWord, bAlertable As DWord) As DWord65 TypeDef PFNSignalObjectAndWait = *Function(hObjectToSignal As HANDLE, hObjectToWaitOn As HANDLE, dwMilliseconds As DWord, bAlertable As DWord) As DWord 66 Dim pSignalObjectAndWait = GetProcAddress(GetModuleHandle("Kernel32.dll"), "SignalObjectAndWait") As PFNSignalObjectAndWait 67 67 If pSignalObjectAndWait = 0 Then 68 68 ' PlatformNotSupportedException 69 69 Debug 70 ExitThread( 0)70 ExitThread(-1) 71 71 End If 72 Return WaitHandle.AfterWait(pSignal AndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord), 1)72 Return WaitHandle.AfterWait(pSignalObjectAndWait(toSignal.Handle, toWaitOn.Handle, millisecondsTimeout As DWord, FALSE), 1) 73 73 End Function 74 74
Note:
See TracChangeset
for help on using the changeset viewer.