Changing bool values to opposite of the initial value September 4, 2023 by Tarik Just do this: threadAlive = !threadAlive;