|
|
@ -59,13 +59,18 @@ final class ReedSolomonGenerator {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ReedSolomonGenerator rs = new ReedSolomonGenerator(degree);
|
|
|
|
try {
|
|
|
|
synchronized(cache) {
|
|
|
|
ReedSolomonGenerator rs = new ReedSolomonGenerator(degree);
|
|
|
|
cache[degree] = new SoftReference<>(rs);
|
|
|
|
synchronized(cache) {
|
|
|
|
isPending[degree] = false;
|
|
|
|
cache[degree] = new SoftReference<>(rs);
|
|
|
|
cache.notifyAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
return rs;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
synchronized(cache) {
|
|
|
|
|
|
|
|
isPending[degree] = false;
|
|
|
|
|
|
|
|
cache.notifyAll();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return rs;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|