Thread.Current

From Xojo Documentation

Read-Only Property (As Thread )
ThreadValue = aThread.Current

New in 2020r2

Supported for all project types and targets.

Returns the thread that was executing at the moment this property was read.

Notes

While this property is currently Nil when accessed from the main thread, do NOT rely on this behavior as it may not be the case in future releases.