0 branches
Tree Top files
Code
Clone with HTTPS:
56 years ago
..

Lockfree Library for V

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.

Features

Data Structures

1. Atomic Counter

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:

2. Ring Buffer

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:

Acknowledgements

This library incorporates research and design principles from: