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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an NSLock for the task delegate鈥檚 task. #2190

Merged
merged 3 commits into from Aug 22, 2017

Conversation

Projects
None yet
3 participants
@jshier
Contributor

jshier commented Jul 3, 2017

Issue Link 馃敆

Fixes #2189.

Goals 鈿斤笍

This PR makes the TaskDelegate's task property thread safe by wrapping private storage with an NSLock.

Implementation Details 馃毀

Simple implementation that will be refined as we reevaluate the threading needs in AF5.

Testing Details 馃攳

No new tests, this PR lets the retry tests pass when running from Xcode 9 with the thread sanitizer active.

@jshier jshier requested a review from cnoon Jul 3, 2017

@jshier jshier added this to the 4.6.0 milestone Jul 3, 2017

@jshier jshier self-assigned this Jul 3, 2017

@cnoon

Just one minor comment back @jshier...PR itself looks good!

Show outdated Hide outdated Source/TaskDelegate.swift
@cnoon

cnoon approved these changes Aug 22, 2017

@cnoon cnoon merged commit 70e5be0 into master Aug 22, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cnoon cnoon deleted the bug/2189-task-threadsafety branch Aug 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment