I have a method that can be called from a thread or not (I didn’t program this part). Is there a simple way to determine if the method is being called from the main thread or from within a thread? I have to do this because if I’m in the main thread I display a message, but if I’m within a thread I just want to log the error.
Short of rewriting a lot of code to handle this I’m wondering if there’s a less intrusive way of checking for this.