nqp icon indicating copy to clipboard operation
nqp copied to clipboard

Make some enhancements to atomic integers

Open Kaiepi opened this issue 3 years ago • 1 comments

  • Give nqp native refs to allow for usage of atomic ops in nqp.
  • Introduce a semaphore-like Counter that performs comparably.
  • I'm getting tired of writing every atomic op twice in Rakudo. Maybe it's time to give the JVM and JS backend atomic int ops?
  • Let Rakudo building at all be the test of native refs, since they will be required at that point in time soon enough.
  • Counter needs sanity tests in its own right. Swapping out Semaphore and its acquire/release for a Counter and its want_pred/need_succ in t/spec/S17-lowlevel/semaphore.t passes OK.
  • Takes the place of https://github.com/Raku/nqp/pull/774.

Kaiepi avatar Jul 24 '22 06:07 Kaiepi

It would be really nice if someone could continue the work of Kaiepi

@patrickbkr @ab5tract @timo @niner

lizmat avatar Sep 29 '24 14:09 lizmat