title: How to check if a thread is running?
body: <p>I'm developing an android app in which I want a particular function to be executed on a different thread. Now, when this thread is running, I don't want another thread to be created. So basically, I want the main thread to check if the thread is running and if it is, I want it to bypass the thread; If it is not then I want it to create a thread and execute that function. How do I do this?</p>