mark threading primitives unsupported on wasm

this gives much clearer feedback, at build time rather than runtime,
when attempting to use TeaVM with code that uses these operations.
This commit is contained in:
Matt McHenry 2019-10-04 09:49:01 -04:00 committed by Alexey Andreev
parent 89ea97d00f
commit ec21f2d8e1

View File

@ -18,7 +18,9 @@ package org.teavm.runtime;
import java.util.Arrays;
import org.teavm.backend.c.intrinsic.RuntimeInclude;
import org.teavm.interop.Import;
import org.teavm.interop.Platforms;
import org.teavm.interop.StaticInit;
import org.teavm.interop.UnsupportedOn;
@StaticInit
public final class EventQueue {
@ -127,10 +129,12 @@ public final class EventQueue {
@Import(name = "teavm_waitFor")
@RuntimeInclude("fiber.h")
@UnsupportedOn(Platforms.WEBASSEMBLY)
private static native void waitFor(long time);
@Import(name = "teavm_interrupt")
@RuntimeInclude("fiber.h")
@UnsupportedOn(Platforms.WEBASSEMBLY)
private static native void interrupt();
private static void ensureCapacity(int capacity) {