Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B Bolts-ObjC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • 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
  • BoltsFramework
  • Bolts-ObjC
  • Merge requests
  • !307

Fix completed var thread safety problem

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/Mourad-Aly/BFTask-completion-thread-safety into master Sep 19, 2017
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: Mourad-Aly

Hi,

I've faced racing condition while using Bolts in our Apps, same issue reported before https://github.com/BoltsFramework/Bolts-ObjC/issues/302 Hot fix is to ensure locking the completed variable, however I don't know why wasn't it already in the lock block (deadlock?)? This is why I'm submitting this PR to ensure that the server tests will not fail since I'm unable to run tests locally (will figure this out). I'd suggest handling thread safety for BFTask in an easier-to-read way than locks, what do you think? GCD for example, sync_barrier?

Updates: I've just seen https://github.com/BoltsFramework/Bolts-ObjC/pull/303 👍

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Mourad-Aly/BFTask-completion-thread-safety