Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More explicit resource management in ChainSync client and server #2893

Merged
merged 4 commits into from
Jan 26, 2021

Commits on Jan 26, 2021

  1. consensus: introduce Watcher, use instead of registry in ChainSync cl…

    …ient
    
    The ChainSync client was using the registry to manage a thread that could
    simply be managed instead with a bracket. I cleaned up the
    `Ouroboros.Consensus.Util.STM` module by adding this `Watcher` abstraction in
    order to do just that. It is now up to the callee to decide if they want to
    spawn the `Watcher` via `ResourceRegistry` or via a bracket.
    nfrisby committed Jan 26, 2021
    Configuration menu
    Copy the full SHA
    a3bfbc3 View commit details
    Browse the repository at this point in the history
  2. consensus: change onKnownSlotChange to knownSlotWatcher

    This commit is propagating the new Watcher abstraction through an abbreviation.
    nfrisby committed Jan 26, 2021
    Configuration menu
    Copy the full SHA
    e26d1f5 View commit details
    Browse the repository at this point in the history
  3. consensus: change onEachTick to tickWatcher

    This commit is propagating the new Watcher abstraction through an abbreviation.
    nfrisby committed Jan 26, 2021
    Configuration menu
    Copy the full SHA
    ca30193 View commit details
    Browse the repository at this point in the history
  4. consensus: add and use bracketWithPrivateRegistry

    See the new declaration's docstring. This is intended to prevent the confusion
    that lead to the recently fixed resource link the ChainSync server.
    nfrisby committed Jan 26, 2021
    Configuration menu
    Copy the full SHA
    bcf8af8 View commit details
    Browse the repository at this point in the history