A high-performance, thread-safe collection of lock-free data structures for the V programming language. Designed for concurrent applications requiring low-latency and high-throughput data processing.
A thread-safe counter with atomic operations.
import datatypes.lockfree
mut counter := lockfree.new_counter[int](0)
counter.increment()
counter.increment_by(5)
value := counter.get() // 6
counter.decrement()
counter.clear()
Features:
A circular buffer for producer-consumer scenarios.
import datatypes.lockfree
mut rb := lockfree.new_ringbuffer[int](1024)
rb.push(10)
rb.push(20)
item := rb.pop() // 10
free := rb.remaining()
Features:
This library incorporates research and design principles from: