Changeset 493 for trunk/Include


Ignore:
Timestamp:
Mar 23, 2008, 11:08:56 PM (17 years ago)
Author:
NoWest
Message:

IsAliveプロパティを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Threading/Thread.ab

    r480 r493  
    9494    ' Public Properties
    9595    '-----------------------
    96 
     96    Function IsAlive() As Boolean
     97        Dim code As DWord
     98        GetExitCodeThread(m_hThread,code)
     99        If code=STILL_ACTIVE Then
     100            Return True
     101        Else
     102            Return False
     103        End If
     104    End Function
    97105   
    98106    'Priority Property
     
    155163
    156164        '自身のスレッドハンドルを閉じる
    157         CloseHandle(m_hThread)
     165        CloseHandle(InterlockedExchangePointer(VarPtr(m_hThread),NULL))
    158166        m_hThread=0
    159167
Note: See TracChangeset for help on using the changeset viewer.