10000 Clean up concurrency issues around Untwister object state · Issue #34 · altf4/untwister · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Clean up concurrency issues around Untwister object state #34
Open
@altf4

Description

@altf4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0