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.
Counter
that performs comparably.Counter
needs sanity tests in its own right. Swapping outSemaphore
and itsacquire
/release
for aCounter
and itswant_pred
/need_succ
int/spec/S17-lowlevel/semaphore.t
passes OK.