MINOR: sample: Add "thread" sample fetch

It returns id of the thread calling the function.
2 files changed