I have an application that has the ability to kick off a new thread that opens a new form (MonitorForm). When I create the thread, I give it a name (let's say, "MyAwesomeThread"). When the originating application tries to kick off the new thread to open the new form, I would like to be able to check if "MyAwesomeThread" is already running. From what I have read, I can only get the names of the processes that are running.
If I have a named thread, how can I check to see if that thread is already running using the name? Does the process inherit the name?
bool threadIsNotRunningAlready = /** what goes here?? **/
if(threadIsNotRunningAlready)
{
ThreadStart threadStart = () => GoGoAwesomeThread(param1, param2);
var executionThread = new Thread(threadStart);
executionThread.Name = "MyAwesomeThread";
executionThread.Start();
}