From 99aa1cf192121c03b5015e696f92ad76f7b13c36 Mon Sep 17 00:00:00 2001 From: Aman Mangal Date: Mon, 18 Mar 2019 23:13:38 +0530 Subject: [PATCH] Update README with context around thread safety --- README.md | 7 ++++++- doc.go | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 404517e..bccd8d8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ # bigqueue [![Build Status](https://travis-ci.com/grandecola/bigqueue.svg?branch=master)](https://travis-ci.com/grandecola/bigqueue) [![Go Report Card](https://goreportcard.com/badge/github.com/grandecola/bigqueue)](https://goreportcard.com/report/github.com/grandecola/bigqueue) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) [![GoDoc](https://godoc.org/github.com/grandecola/bigqueue?status.svg)](https://godoc.org/github.com/grandecola/bigqueue) [![codecov](https://codecov.io/gh/grandecola/bigqueue/branch/master/graph/badge.svg)](https://codecov.io/gh/grandecola/bigqueue) [![golangci](https://golangci.com/badges/github.com/grandecola/bigqueue.svg)](https://golangci.com/r/github.com/grandecola/bigqueue) `bigqueue` provides embedded, fast and persistent queue written -in pure Go using memory mapped (`mmap`) files. +in pure Go using memory mapped (`mmap`) files. `bigqueue` is +currently **not** thread safe. Check out the roadmap for +[v0.3.0](https://github.com/grandecola/bigqueue/milestone/4) +for more details on progress on thread safety. To use `bigqueue` +in parallel context, a **Write** lock needs to be acquired +(even for `Read` APIs). ## Installation ``` diff --git a/doc.go b/doc.go index 514c413..fd81624 100644 --- a/doc.go +++ b/doc.go @@ -1,5 +1,7 @@ // Package bigqueue provides embedded, fast and persistent queue -// written in pure Go using memory mapped file +// written in pure Go using memory mapped file. bigqueue is +// currently not thread safe. To use bigqueue in parallel context, +// a Write lock needs to be acquired (even for Read APIs). // // Create or open a bigqueue: //