[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Classes' (#rtl)

# TThreadStatusNotifyEvent

Signature of thread status report event handler

## Declaration

Source position: classesh.inc line 1691

`type TThreadStatusNotifyEvent = procedure(`
`Sender: TThread;`
`const status: string`
`) of object;`

## Description

TThreadStatusNotifyEvent is the signature of the method to be provided when executing something in a thread using TThread.ExecuteInThread when status reporting is required.

This event handler will be called in the main thread. When called, it has the thread whose status is reported in Sender, and the status message in ReportStatus is passed to the method.

Note that the thread reporting its status is blocked while the callback is being handled: The status is be reported to the main thread using TThread.synchronize.

## See also

TThread.ExecuteInThread |  | Execute a method or static procedure in a thread
TThreadReportStatus |  | Thread status report callback prototype
TThreadExecuteStatusHandler |  | Signature of method to execute in a thread, with status reporting

Documentation generated on: May 14 2021