Skip to content

Conversation

@RReichert
Copy link
Contributor

Changes

If you read the Cereal library documentation, you will be shocked that the default behavior for the library is to not have it run in a multithreaded manner. It apparently has a global variable that it uses to track information and it works nicely in a single threaded application, however in a mutlithreaded application is can be problematic.

The changes here changes the default behavior so that this global variable is thread safe and doesn't cause any undefined behavior.

@RReichert RReichert requested a review from a team as a code owner August 28, 2025 03:48
@RReichert RReichert merged commit 299794d into main Aug 29, 2025
1 check passed
@RReichert RReichert deleted the rodrigor/cereal-library-thread-safe branch August 29, 2025 00:10
RReichert added a commit to swift-nav/albatross that referenced this pull request Aug 29, 2025
# Changes

If you read the [Cereal library
documentation](https://uscilab.github.io/cereal/thread_safety.html), you
will be shocked that the default behavior for the library is to not have
it run in a multithreaded manner. It apparently has a global variable
that it uses to track information and it works nicely in a single
threaded application, however in a mutlithreaded application is can be
problematic.

The changes here changes the default behavior so that this global
variable is thread safe and doesn't cause any undefined behavior.

# Related PR

swift-nav/rules_swiftnav#178 - bazel
implementation
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.

3 participants