Open akkrat opened 1 year ago
pthread_mutex_t is too slow. We need to use something faster on iOS / macOS.
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
https://gist.github.com/steipete/36350a8a60693d440954b95ea6cbbafc
In my opnion os_unfair_lock would work.
On Mon, Sep 5, 2022 at 8:57 AM Artur Protska @.***> wrote:
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
— Reply to this email directly, view it on GitHub https://github.com/MailCore/mailcore2/pull/1953#issuecomment-1237246741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRDCGCM4GBXSZ2O5PKSO3V4YKALANCNFSM57PFLEQA . You are receiving this because you commented.Message ID: @.***>
-- DINH Viêt Hoà
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)