Skip to content

[gardening] Use defer for end-of-scope calls #902

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 2 commits into from
Mar 10, 2017

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Mar 2, 2017

No description provided.

@naithar
Copy link
Contributor Author

naithar commented Mar 2, 2017

@parkera please review

@parkera
Copy link
Contributor

parkera commented Mar 3, 2017

The free and stream.close are ok, but I'm not a fan of using defer to unlock locks. It is super important to be very aware of exactly where the lock becomes unlocked, and personally I prefer to do that explicitly.

Revert 'defer' for lock()/unlock()
@naithar
Copy link
Contributor Author

naithar commented Mar 3, 2017

Reverted defer for lock()/unlock().

@parkera
Copy link
Contributor

parkera commented Mar 3, 2017

@swift-ci please test

@naithar
Copy link
Contributor Author

naithar commented Mar 3, 2017

The build job finished successfuly

@parkera
Copy link
Contributor

parkera commented Mar 3, 2017

@swift-ci please test

@alblue
Copy link
Contributor

alblue commented Mar 9, 2017

@parkera these tests finished last week - any objections to merge?

@parkera
Copy link
Contributor

parkera commented Mar 9, 2017

@swift-ci please test and merge

@naithar
Copy link
Contributor Author

naithar commented Mar 10, 2017

Build job failed with
Test Case 'TestURLSession.test_cancelTask' started at 12:20:09.578 /home/buildnode/jenkins/workspace/swift-corelibs-foundation-PR-Linux/swift/utils/build-script-impl: line 262: 3781 Segmentation fault (core dumped) "$@"
This doesn't seem to be related

I'll try to reproduce this on Linux machine

@alblue
Copy link
Contributor

alblue commented Mar 10, 2017

@swift-ci please test and merge

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.

4 participants