Skip to content

Conversation

akkrat
Copy link

@akkrat akkrat commented Aug 24, 2022

Fixing #1785
pthread_mutex_t was chosen because

  1. it's already using on some platforms
  2. os_unfair_lock must be allocated on the heap so it couldn't be used as c++ class member (Concurrent Programming With GCD in Swift 3 or SO)

@dinhvh
Copy link
Member

dinhvh commented Aug 25, 2022

pthread_mutex_t is too slow.
We need to use something faster on iOS / macOS.

@akkrat
Copy link
Author

akkrat commented Sep 5, 2022

libetpan uses pthread_mutex_t too
The other alternatives (such as dispatch semaphore or os_unfair_lock) are not much faster than pthread_mutex_t

@dinhvh
Copy link
Member

dinhvh commented Sep 5, 2022 via email

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.

2 participants