Support for "auto"-daemon attaching - attaches as daemon if this_thread != mainThread, or as non-daemon if this_thread == mainThread.