From inside a hook callback, returns the thread whose call triggered the hook, or nil when there is no such thread. Useful for attributing a hooked call back to its caller.

Returns

thread or nil
The triggering thread, or nil.

Example