Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xsleonard/select-vs-mutex

Golang comparison of a lock-free select to a mutex
https://github.com/xsleonard/select-vs-mutex

Last synced: 1 day ago
JSON representation

Golang comparison of a lock-free select to a mutex

Awesome Lists containing this project

README

        

select-vs-mutex
===============

Golang comparison of a lock-free select to a mutex

This is a companion repo to [Avoiding Locks in Golang](https://xsleonard.github.io/2014/01/15/avoiding-locks-golang/)

Benchmarks
----------

```
go test -bench=With
```

will run the benchmarks comparing mutex (WithLock) and select (WithoutLock).

```
go test -bench="(Read)|(Write)"
```

will run the benchmarks for the lock-free read and write methods.