Skip to content

Lock reads and writes to session map - #1970

Merged
morganchen12 merged 1 commit into
firebase:masterfrom
morganchen12:urlsession
Oct 23, 2018
Merged

Lock reads and writes to session map#1970
morganchen12 merged 1 commit into
firebase:masterfrom
morganchen12:urlsession

Conversation

@morganchen12

@morganchen12 morganchen12 commented Oct 19, 2018

Copy link
Copy Markdown
Contributor

Potentially fix #1964.

TAP runs over at cr/217930814.

@paulb777

Copy link
Copy Markdown
Member

Any particular reason for NSLock versus GCD or @synchronized?

@morganchen12

Copy link
Copy Markdown
Contributor Author

I wanted an explicit object to lock/unlock on rather than an implicit lock associated with a class instance or something. This isn't a hugely important decision, and I can rewrite to use @synchronized if preferable.

@ryanwilson

Copy link
Copy Markdown
Member

I think this may be causing a deadlock based on Travis. Please try to catch this locally if you can to make sure we aren't causing a deadlock anywhere.

Using NSLock is good with me, or I started an implementation with GCD if locking is causing issues (I'd prefer to avoid @synchronized).

@morganchen12

Copy link
Copy Markdown
Contributor Author

Fixed deadlock and passed travis.

@morganchen12
morganchen12 merged commit b68f0f9 into firebase:master Oct 23, 2018
@morganchen12
morganchen12 deleted the urlsession branch October 23, 2018 16:49
@firebase firebase locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GULNetworkURLSession crashes

4 participants