HaxeFoundation / HaxeFoundation/haxe

Atomic shims for sys targets

Open
#12,293 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Only four targets support atomics (jvm, hl, cpp, and js?!), but all sys targets could emulate them with a mutex. We've been doing that on the coroutine branch so we don't have to have `#if` blocks everywhere. Having a fallback implementation for sys targets seems quite useful outside of our coroutine stuff as it would remove the need for all those `#if` blocks in places such as here https://github.com/HaxeFoundation/haxe/pull/12292

I'm not sure how best to do this though since we can't do something like `AtomicInt.sys.hx`, add a `#if sys` block to the non target `AtomicInt`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.