• Alexander Larsson's avatar
    Add GAtomicArray for RCU-style lockless updates · 75ce4741
    Alexander Larsson authored
    This adds supports for a lock-less a non-shrinking growable array.
    You can use it to do reads using no locks, as long as your read-code
    can handle that during the read transaction the object can be modified
    by another writer (but it will not change size or be freed), and you
    can only trust the result once the transaction has finished successfully.
    This doesn't free things like RCU normally does, instead it pushes the
    memory on a free list that is reused for other atomic arrays.
gatomicarray.h 2.08 KB