adobkin / libcapn

A simple C Library for interact with the Apple Push Notification Service (APNs)
MIT License
100 stars 37 forks source link

multi-pthread safe? #31

Open DyncKevin opened 8 years ago

DyncKevin commented 8 years ago

is this multi-pthreads safe to invoke apn_send()??? does the ssl in this will case dead-lock ???

because When I integrated this library, the usage of cpu increase to 99% after a long time

adobkin commented 8 years ago

It's not thread-safe, you must create apn_ctx in each thread.

DyncKevin commented 8 years ago

Thank you for your reply, I have moved this part to single thread instead.

Plus, I just heard that Apple has supported 'HTTP/2 Protocol for iOS Push Notification Server(APNS)' (https://dblog.laulkar.com/http2-protocol-for-apns.html), do you have the plan to support it recently ?

郑啸铠 上海铂渊电子科技有限公司 地址:杨浦区国权北路1688号湾谷科技园A6栋 电话: 15618953785 邮编:200439

Original Message Sender:Anton Dobkinnotifications@github.com Recipient:adobkin/libcapnlibcapn@noreply.github.com Cc:DyncKevinzhengxiaokai@dync.cc; Authorauthor@noreply.github.com Date:Sunday, Sep 4, 2016 16:44 Subject:Re: [adobkin/libcapn] multi-pthread safe? (#31)

It's not thread-safe, you must create apn_ctx in each thread. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.