Open
Description
There really isn't any reason to have IAtomicArray. On the JVM we have a bad situation since we don't have memory barriers, and so there is no way to force the CPU to flush all data written to the state array. The situation on the CLR is much better:
For this CLR port I recommend switching away from an atomic array to a Object[]. All you need to do then is a call to Thread.MemoryBarrier()
on the exit of every loop (see line 923 in ioc_macros.clj). This should actually be pretty fast since the array can be held purely in the cache until it's flushed each time the state machine is paused.
Metadata
Metadata
Assignees
Labels
No labels
Activity