A collection of lock-free data structures in Golang, done as a project under the course: Heterogenous Parallelism (UE18CS342), at PES University.
package main
import (
"sync"
"github.com/MadhavJivrajani/locknt/queue"
)
func main() {
q := queue.NewLockFreeQueue()
var wg sync.WaitGroup
for i := 0; i < 10; i++ {
wg.Add(1)
go func(i int) {
defer wg.Done()
q.Enqueue(i)
}(i)
}
wg.Wait()
queue.PrintQueue(q)
}
go test -bench=^<benchmark_name>$ -benchtime=100000x -cpuprofile profile_file.out
go tool pprof profile_file.out
(pprof) web # insde pprof, type this
- Madhav Jivrajani
- M S Akshatha Laxmi
- Sparsh Temani
The presentations done for this project can be found here.