HaxeFoundation / HaxeFoundation/haxe
Atomic shims for sys targets
Open
- 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
Assessment
This issue has not been assessed yet.