Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Merge requests
  • !151

Ensure close() doesn't cause the application to hang

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/mosilla/safe-close into master Aug 14, 2015
  • Overview 5
  • Commits 3
  • Pipelines 0
  • Changes 7

Created by: mosilla

Previously, calling close could result in Redis connections being closed before internal timers depending on those connections have executed or been cancelled. This would cause the application to hang indefinitely.

This commit renames the old close method to disconnect and adds a new close implementation which wraps disconnect but defers the call until all outstanding timer handles have been released.

This ensures that close is safe to call from anywhere at any time, even from within a job handler.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mosilla/safe-close