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.
@@ -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) {
