Changeset 599 for trunk/ab5.0/ablib/src/Classes/System/Threading/Thread.ab
- Timestamp:
- Aug 20, 2008, 3:37:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/Threading/Thread.ab
r597 r599 460 460 461 461 Function FindThreadInfo(threadID As DWord) As *ThreadInfo 462 EnterCriticalSection(CriticalSection) 462 463 Dim i As Long 463 464 For i = 0 To ELM(ThreadNum) … … 467 468 End If 468 469 Next 470 LeaveCriticalSection(CriticalSection) 469 471 End Function 470 472 … … 476 478 Public 477 479 Function GetCurrentException() As ExceptionService 480 EnterCriticalSection(CriticalSection) 478 481 Dim dwNowThreadId = GetCurrentThreadId() 479 480 482 Dim i As Long 481 483 For i=0 To ELM(ThreadNum) 482 484 With collection[i] 483 485 If .thread.ThreadId = dwNowThreadId Then 484 Return .exception 486 GetCurrentException = .exception 487 Exit For 485 488 End If 486 489 End With 487 490 Next 488 489 OutputDebugString( Ex"カレントスレッドの取得に失敗\r\n" ) 490 Return Nothing 491 LeaveCriticalSection(CriticalSection) 492 If ActiveBasic.IsNothing(GetCurrentException) Then 493 OutputDebugString(Ex"カレントスレッドの取得に失敗\r\n") 494 End If 491 495 End Function 492 496 End Class
Note:
See TracChangeset
for help on using the changeset viewer.