This maybe sound strange to you but I\'m too lazy to write everytime like
if (threadAlive) { threadAlive = false; } else { th
The logical negation operator ! is a unary operator that negates its operand. It is defined for bool and returns true if and only if its operand is false and false if and only if its operand is true:
!
bool
true
false
threadAlive = !threadAlive;