Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
G git-backup
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • git-backup
  • Repository

Switch branch/tag
  • git-backup
  • git.go
Find file BlameHistoryPermalink
  • Kirill Smelkov's avatar
    *: Add cancellation handling via contexts · 540f0ead
    Kirill Smelkov authored Jan 13, 2020
    Add ctx parameter to cmd_pull, cmd_restore and inner functions that they
    call that can block and handle ctx cancel where we can. For now both
    pull and restore are always run under background context, but in the
    next patch we'll connect SIGINT+SIGTERM to cancel spawned work.
    
    In general a service - even a command line utility - needs to handle
    cancellation properly and itself to maintain consistency of external
    state. See e.g.
    
    	https://callistaenterprise.se/blogg/teknik/2019/10/05/go-worker-cancellation/
    
    for example.
    540f0ead
git.go 5.77 KB
EditWeb IDE

Replace git.go

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7