Public Static Sub AddThreadExit(h As Handler) If IsNothing(threadExit) Then threadExit = h Else threadExit += h End If End Sub Static Sub RemoveThreadExit(h As Handler) If Not IsNothing(threadExit) Then threadExit -= h End If End Sub Protected Static Function OnThreadExit(e As Args) As Boolean If Not IsNothing(threadExit) Then threadExit(This, e) Return True End If End Function Private Static threadExit As Handler