-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make C++ Session object thread safe #62
Comments
hvge
added a commit
that referenced
this issue
Oct 17, 2017
hvge
added a commit
that referenced
this issue
Oct 17, 2017
hvge
added a commit
that referenced
this issue
Oct 17, 2017
…hread safety. IOS: PA2Session now always contains a valid Session instance. The object initializer is validating the instance during the object creation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should make methods in C++
class Session
thread safe. We had a several discussions about this topic and it looks like that the best solution is to add the synchronization directly to the low level Session object. The original idea was about to synchronize just the signature calculation operations (due to signature counter increment). This seems to be insufficient, because the lifetime of the Session object is typically very long and we're reusing the object for the whole lifetime of PowerAuthSDK object. The long lifetime means higher chance to get an obscure race condition.Looks like that the sufficient solution is to add a guard-locks to the public Session's methods. So, the change will affect all supported platforms.
Important for IOS
The
PA2Session
stores the last error code to the object instance. That's also wrong and the interface should be changed. We have a related ticket #49 for that.The text was updated successfully, but these errors were encountered: