mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
threadsafety? #155
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcuskbr on GitHub (Feb 2, 2017).
Recently I get SEGV signals inside the brotli directory decoding content of Youtube and I was wondering if this brotli library is threadsafe ?
I.e. can I use multiple threads that repeatedly do this:
@eustas commented on GitHub (Feb 6, 2017):
Brotli does not use any shared mutable data; but there are no explicit memory barriers.
So, as long as all things with a single instance are done within one thread - it is safe; every thread may work with as many instances as it wants.
But as soon as instance is passed between threads, developer should take care of exclusive access to the instance and appropriate memory barriers.
@eustas commented on GitHub (Feb 6, 2017):
I believe this model is called "conditionally safe".