Skip to content

[SR-2798] Fix deadlock in URLSession. #662

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

aleksgapp
Copy link
Contributor

The problem is in the current implementation of finishTasksAndInvalidate, if there're executing tasks in session - it will create a semaphore, that will block session work queue, but to release, it has to enter that queue again.

Resolves SR-2798.

@pushkarnk
Copy link
Member

Oh, I see the problem. taskRegistry.remove() was called on the same queue. Thanks.

@pushkarnk
Copy link
Member

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Sep 29, 2016

LGTM, @pushkarnk go ahead and merge when you're happy.

@pushkarnk pushkarnk merged commit d2212fe into swiftlang:master Sep 30, 2016
@pushkarnk
Copy link
Member

I agree with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants