mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fixes illegal behavior of UnicodeSupport during multi-threaded build
This commit is contained in:
parent
cc8d2b8903
commit
723ad74f2e
|
@ -30,7 +30,7 @@ import org.teavm.common.IntegerArray;
|
||||||
*/
|
*/
|
||||||
public class UnicodeSupport {
|
public class UnicodeSupport {
|
||||||
private static AtomicBoolean filled = new AtomicBoolean();
|
private static AtomicBoolean filled = new AtomicBoolean();
|
||||||
private static volatile CountDownLatch latch = new CountDownLatch(0);
|
private static volatile CountDownLatch latch = new CountDownLatch(1);
|
||||||
private static int[] digitValues;
|
private static int[] digitValues;
|
||||||
|
|
||||||
private static void parseUnicodeData() {
|
private static void parseUnicodeData() {
|
||||||
|
@ -130,6 +130,7 @@ public class UnicodeSupport {
|
||||||
private static void ensureUnicodeData() {
|
private static void ensureUnicodeData() {
|
||||||
if (filled.compareAndSet(false, true)) {
|
if (filled.compareAndSet(false, true)) {
|
||||||
parseUnicodeData();
|
parseUnicodeData();
|
||||||
|
latch.countDown();
|
||||||
latch = null;
|
latch = null;
|
||||||
} else {
|
} else {
|
||||||
CountDownLatch latchCopy = latch;
|
CountDownLatch latchCopy = latch;
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
</goals>
|
</goals>
|
||||||
<phase>process-test-classes</phase>
|
<phase>process-test-classes</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<minifying>false</minifying>
|
<minifying>true</minifying>
|
||||||
<numThreads>1</numThreads>
|
<numThreads>1</numThreads>
|
||||||
<scanDependencies>true</scanDependencies>
|
<scanDependencies>true</scanDependencies>
|
||||||
<outputDir>${project.build.directory}/javascript-tck</outputDir>
|
<outputDir>${project.build.directory}/javascript-tck</outputDir>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user