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

msgpack.fallback.Packer.pack is not thread safe #341

yaccz opened this issue Jan 16, 2019 · 2 comments


Copy link

@yaccz yaccz commented Jan 16, 2019

msgpack.fallback.Packer.pack is not thread safe while the cython implementation seems to be by acquiring GIL. This may be a difference at least worth mentioning somewhere.


This comment has been minimized.

Copy link

@jfolz jfolz commented Jan 16, 2019

The GIL does not make code thread-safe. It merely ensures that reference-counting is done correctly. AFAIK neither implementation is thread-safe.


This comment has been minimized.

Copy link

@methane methane commented Jan 17, 2019

Like many classes in Python stdlib, it's is not thread safe unless it's documented as "thread safe"
explicitly. Even if Cython implementation is thread safe (I don't confirmed it yet), it's implementation detail.
You must use Cython implementation in single thread, or use mutex too.

@methane methane closed this Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.