State tracking and thread dependency in the Untwister class is a bit messy. It needs some cleaning. There are three states Untwister can be in: starting, running, or finished. Importantly, these states are strictly sequential. Some issues related to this are:
Users of Untwister can check this state by querying one of three bools, which map to the above states. This is clumsy because it's possible for multiple or none of the bools to be set at any given time. (Due to a race condition window of time between changing states)
Checking state is not reliable, as the state can change the moment after you've checked it. This can be resolved by either blocking all of untwister while status is being checked (which would be horrible), or by making it clear that status is unreliable and that users of the Untwister object have to be aware of that.
State tracking and thread dependency in the Untwister class is a bit messy. It needs some cleaning. There are three states Untwister can be in: starting, running, or finished. Importantly, these states are strictly sequential. Some issues related to this are: