Implemented DeleteThread and TerminateThread in THBASE.