See https://github.com/HaxeFoundation/haxe/issues/10947
@@ -3,6 +3,7 @@ package haxe.atomic;
#if cppia
extern
#end
+@:noDoc
abstract AtomicInt(cpp.Pointer<Int>) {
public #if !(scriptable || cppia) inline #end function new(value:Int) {
this = cpp.Pointer.ofArray([value]);
@@ -8,6 +8,7 @@ private class IntWrapper {
}
abstract AtomicInt(IntWrapper) to IntWrapper {
public inline function new(value:Int) {
this = new IntWrapper(value);
@@ -8,6 +8,7 @@ package haxe.atomic;
Atomic integer.
(js) The Atomics and SharedArrayBuffer objects need to be available. Errors will be thrown if this is not the case.
**/
@:coreType
abstract AtomicInt {
public function new(value:Int):Void;
@@ -5,6 +5,7 @@ package haxe.atomic;
import hl.Atomics;
abstract AtomicInt(hl.NativeArray<Int>) {
public inline function new(value:Int):Void {
this = new hl.NativeArray(1);
@@ -2,6 +2,7 @@ package haxe.atomic;
import java.util.concurrent.atomic.AtomicInteger;
abstract AtomicInt(AtomicInteger) {
this = new AtomicInteger(value);
import js.lib.Atomics;
abstract AtomicInt(js.lib.Int32Array) to js.lib.Int32Array {
this = new js.lib.Int32Array(new js.lib.SharedArrayBuffer(js.lib.Int32Array.BYTES_PER_ELEMENT));