Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public RawErasureDecoder(ErasureCoderOptions coderOptions) {
* @param outputs output buffers to put decoded data into according to
* erasedIndexes, ready for read after the call
*/
public void decode(ByteBuffer[] inputs, int[] erasedIndexes,
public synchronized void decode(ByteBuffer[] inputs, int[] erasedIndexes,
ByteBuffer[] outputs) throws IOException {
ByteBufferDecodingState decodingState = new ByteBufferDecodingState(this,
inputs, erasedIndexes, outputs);
Expand Down Expand Up @@ -130,7 +130,7 @@ protected abstract void doDecode(ByteBufferDecodingState decodingState)
* erasedIndexes, ready for read after the call
* @throws IOException if the decoder is closed.
*/
public void decode(byte[][] inputs, int[] erasedIndexes, byte[][] outputs)
public synchronized void decode(byte[][] inputs, int[] erasedIndexes, byte[][] outputs)
throws IOException {
ByteArrayDecodingState decodingState = new ByteArrayDecodingState(this,
inputs, erasedIndexes, outputs);
Expand Down Expand Up @@ -163,7 +163,7 @@ protected abstract void doDecode(ByteArrayDecodingState decodingState)
* erasedIndexes, ready for read after the call
* @throws IOException if the decoder is closed
*/
public void decode(ECChunk[] inputs, int[] erasedIndexes,
public synchronized void decode(ECChunk[] inputs, int[] erasedIndexes,
ECChunk[] outputs) throws IOException {
ByteBuffer[] newInputs = CoderUtil.toBuffers(inputs);
ByteBuffer[] newOutputs = CoderUtil.toBuffers(outputs);
Expand Down