There’s a number of ways this could be solved. If an object is returned for the main thread, we’d need a way to identify it. Or as you suggest, a method that tells us if we’re on the main thread. Whatever the solution is, it’s kind of besides the point. The point is right now Xojo tells us not to do something in order to future proof, but hasn’t given us a way to heed their advice. At least unless I’m missing something.
I agree. We need some method of determining this now with some authority. I know I’ve implemented this in places that, thinking back, I’d rather have a dependable response.
Returning a Thread object representing the main thread could work as you could either compare Thread.Main as Thread to Thread.Current as Thread or Thread.CurrentThread.IsMain as Boolean, or Thread.MainID could be a value we compare to Thread.Current.ThreadID.