Comments (4)
The core struct (type reedSolomon struct
) is largely stateless, except for the field tree
of type inversionTree
, which is a specialised cache for temporary storage of matrices used for reconstruction.
inversionTree
is protected by a mutex.
So to the best of my knowledge, yes it is safe to use it in multiple goroutines for all scenarios.
from reedsolomon.
from reedsolomon.
All good.
The same architecture is implemented in a Rust port of this library, and Rust would complain if it's not thread-safe when you use it in a multi-thread scenario. So overall I believe it is thread-safe.
from reedsolomon.
Yes, it is, but checking with the race detector is of course always recommended - if nothing more then to check your side of the code.
from reedsolomon.
Related Issues (20)
- Slice bounds out of range at ReconstructData HOT 8
- replace [][]byte with []byte to reduce gogc scan time HOT 4
- Suggestion: Export Galois field arithmetic and move it to a subpackage like reedsolomon/galois HOT 2
- panic: runtime error: index out of range at Split() HOT 1
- Can we use WithLeopardGF16(true) when shards are less than 256?
- runtime error: slice bounds out of range HOT 3
- Slice bounds out of range [6400:3200] in codeSomeShardsAVXP HOT 4
- Consider introducing a new error when shard size is not a multiple of 64
- (*reedSolomon).codeSomeShardsGFNI and others should make use of defer for sync.WaitGroup operations like .Done() and .Wait() HOT 1
- How to speed up progressive encoding? HOT 6
- Encoder return the same content for many shards HOT 4
- First parameter of galDivide is always 1 HOT 9
- JS implementation HOT 1
- A
- Implement proper ReconstructSome for leopard
- `ReconstructSome` for Leopard HOT 3
- Consider allowing reconstructSome to compute parity shards
- concurrency: (*inversionTree).GetInvertedMatrix holds a read-lock before returning a slice to naked usage yet slices are mutable and without the lock hence susceptible to using the wrong data/data races HOT 2
- How does the performance compare with golang's https://github.com/klauspost/reedsolomon?
- Loading argument twice off the stack?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reedsolomon.