Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • G git-backup
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • 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

Replace git.go

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7