in reply to Thread detach

Note that this shouldn't be an error, it is merely a warning that the main thread exited already. It should not affect any part of your code.