Skip to content
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

Use pthread mutex instead of a semaphore for locking #96

Merged
merged 1 commit into from Jul 19, 2016
Merged

Use pthread mutex instead of a semaphore for locking #96

merged 1 commit into from Jul 19, 2016

Conversation

maicki
Copy link
Collaborator

@maicki maicki commented Jul 19, 2016

For performance reasons move locking from a dispatch_semaphore_t to pthread_mutex_t.

@garrettmoon
Copy link
Collaborator

I think that something like this would be a bit more performant? https://github.com/pinterest/PINRemoteImage/blob/master/Pod/Classes/PINRemoteLock.m

I'd also be ok with using a mutex directly.

@maicki maicki changed the title Use NSLock instead of a semaphore for locking Use pthread mutex instead of a semaphore for locking Jul 19, 2016
@jparise
Copy link
Collaborator

jparise commented Jul 19, 2016

Can you update the commit description to explain the benefit of this change?

@garrettmoon garrettmoon merged commit ad3af36 into pinterest:master Jul 19, 2016
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.

None yet

3 participants