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

Thread-safe Session #89

Closed
ecorm opened this issue Nov 4, 2015 · 2 comments
Closed

Thread-safe Session #89

ecorm opened this issue Nov 4, 2015 · 2 comments
Assignees

Comments

@ecorm
Copy link
Owner

ecorm commented Nov 4, 2015

Consider making Session objects more thread safe. This might entail that internal::WampMessage objects can no longer be reused in internal::Client, but must be constructed every time a message needs to be sent.

@ecorm ecorm added the client label Nov 4, 2015
@ecorm ecorm added this to the v0.6.0 milestone Dec 18, 2015
@ecorm ecorm self-assigned this Dec 18, 2015
@ecorm ecorm removed this from the v0.6.0 milestone Dec 21, 2015
@ecorm ecorm added enhancement and removed client labels Feb 9, 2016
@ecorm ecorm removed their assignment May 20, 2022
@ecorm
Copy link
Owner Author

ecorm commented Aug 3, 2022

Now that serializer/deserializer instances are reused within the same Session, making its existing operations reentrant is impossible without posting everything to Session's strand.

A set thread-safe methods (or overloads) will be added to Session which post everything to Session's strand. That way, single-threaded apps can continue using the existing API without the post penalty.

@ecorm ecorm self-assigned this Aug 3, 2022
@ecorm ecorm added this to the v0.10 milestone Aug 3, 2022
@ecorm
Copy link
Owner Author

ecorm commented Aug 13, 2022

Completed in 29153f6

Session now has overloads taking the ThreadSafe tag which will perform the operation in a thread-safe manner when invoked from concurrent threads,

@ecorm ecorm closed this as completed Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant