Skip to content

Commit dc21d35

Browse files
committed
all: move to golang.design/x/lockfree
1 parent c3c27fd commit dc21d35

24 files changed

+267
-57
lines changed

.github/workflows/lockfree.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: lockfree
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: Set up Go 1.x
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: ^1.13
20+
id: go
21+
22+
- name: Check out code into the Go module directory
23+
uses: actions/checkout@v2
24+
25+
- name: Get dependencies
26+
run: |
27+
go get -v -t -d ./...
28+
29+
- name: Test
30+
run: |
31+
go test -v -race -timeout 60m -coverprofile=coverage.txt -covermode=atomic ./...
32+
33+
- name: Upload coverage profile
34+
uses: codecov/codecov-action@v1
35+
with:
36+
token: ${{secrets.CODECOV_TOKEN}}
37+
file: coverage.txt

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Ou Changkun
3+
Copyright (c) 2019-2020 The golang.design Authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Copyright 2020 The golang.design Initiative authors.
2+
# All rights reserved. Use of this source code is governed
3+
# by a MIT license that can be found in the LICENSE file.
4+
15
COUNT := $(if $(COUNT),$(COUNT),1)
26

37
all:

README.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,19 @@
11
# lockfree
22

3-
[![GoDoc](https://godoc.org/github.com/changkun/lockfree?status.svg)](https://godoc.org/github.com/changkun/lockfree)
4-
[![Build Status](https://travis-ci.org/changkun/lockfree.svg?branch=master)](https://travis-ci.org/changkun/lockfree) [![Go Report Card](https://goreportcard.com/badge/github.com/changkun/lockfree)](https://goreportcard.com/report/github.com/changkun/lockfree) [![codecov](https://codecov.io/gh/changkun/lockfree/branch/master/graph/badge.svg)](https://codecov.io/gh/changkun/lockfree) [![](https://img.shields.io/github/release/changkun/lockfree/all.svg)](https://github.com/changkun/lockfree/releases)
3+
[![PkgGoDev](https://pkg.go.dev/badge/golang.design/x/lockfree)](https://pkg.go.dev/golang.design/x/lockfree) [![Go Report Card](https://goreportcard.com/badge/golang.design/x/lockfree)](https://goreportcard.com/report/golang.design/x/lockfree)
4+
![lockfree](https://github.com/golang-design/lockfree/workflows/lockfree/badge.svg?branch=master)
5+
[![codecov](https://codecov.io/gh/golang-design/lockfree/branch/master/graph/badge.svg)](https://codecov.io/gh/golang-design/lockfree)
56

6-
Package lock-free offers lock-free utilities in Go.
7-
8-
## Contributing
9-
10-
We would love to have your experiences. Feel free to [submit an issue](https://github.com/changkun/lockfree/issues/new) for requesting new implementation or bug report.
11-
12-
## List of Algorithms
13-
14-
### Linked List
15-
16-
- [ ] Harris, Timothy L. "A pragmatic implementation of non-blocking linked-lists." International Symposium on Distributed Computing. Springer, Berlin, Heidelberg, 2001. [PDF](https://pdfs.semanticscholar.org/68a9/005a5ec10daece36ca5ecb9cad7be44770b1.pdf)
17-
- [ ] Sundell, Hakan, and Philippas Tsigas. "Lock-Free and Practical Deques and Doubly Linked Lists using Single-Word Compare-And-Swap." 2004 [PDF](https://pdfs.semanticscholar.org/8a68/f45bd32ed050a96faa24139ab71178258f13.pdf)
18-
- [ ] Valois, John D. "Lock-free linked lists using compare-and-swap." PODC. Vol. 95. 1995. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.41.9506&rep=rep1&type=pdf)
19-
20-
### Queue
217

22-
- [x] Maged M. Michael and Michael L. Scott. 1996. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proceedings of the fifteenth annual ACM symposium on Principles of distributed computing (PODC '96). ACM, New York, NY, USA, 267-275. [PDF](https://apps.dtic.mil/dtic/tr/fulltext/u2/a309412.pdf)
23-
- [ ] Shann, Chien-Hua, Ting-Lu Huang, and Cheng Chen. "A practical nonblocking queue algorithm using compare-and-swap." Proceedings Seventh International Conference on Parallel and Distributed Systems (Cat. No. PR00568). IEEE, 2000. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.199.7928&rep=rep1&type=pdf)
24-
- [ ] Fober, Dominique, Yann Orlarey, and Stéphane Letz. "Optimised lock-free FIFO queue." (2001). [PDF](https://hal.archives-ouvertes.fr/hal-02158792/document)
25-
- [ ] Evequoz, Claude. "Non-blocking concurrent fifo queues with single word synchronization primitives." 2008 37th International Conference on Parallel Processing. IEEE, 2008. [PDF](https://www.liblfds.org/downloads/white%20papers/%5BQueue%5D%20-%20%5BEvequoz%5D%20-%20Non-Blocking%20Concurrent%20FIFO%20Queues%20With%20Single%20Word%20Synchroniation%20Primitives.pdf)
26-
27-
### Skip-list
28-
29-
- [ ] Fomitchev, Mikhail, and Eric Ruppert. "Lock-free linked lists and skip lists." Proceedings of the twenty-third annual ACM symposium on Principles of distributed computing. ACM, 2004. [PDF](http://people.scs.carleton.ca/~edwardduong/PDF_files_of_relevant_papers/2004%20-%20Lock-free%20Linked%20List%20and%20Skip%20Lists.pdf)
30-
- [ ] Herlihy, Maurice, et al. "A provably correct scalable concurrent skip list." Conference On Principles of Distributed Systems (OPODIS). 2006. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.170.719&rep=rep1&type=pdf)
31-
32-
### Stack
33-
34-
- [ ] Hendler, Danny, Nir Shavit, and Lena Yerushalmi. "A scalable lock-free stack algorithm." Proceedings of the sixteenth annual ACM symposium on Parallelism in algorithms and architectures. ACM, 2004. [PDF](http://www.inf.ufsc.br/~dovicchi/pos-ed/pos/artigos/p206-hendler.pdf)
35-
36-
### Tree
8+
Package lock-free offers lock-free utilities in Go.
379

38-
- [ ] Bronson, Nathan G., et al. "A practical concurrent binary search tree." ACM Sigplan Notices. Vol. 45. No. 5. ACM, 2010. [PDF](http://www.academia.edu/download/42135309/ppopp207-bronson.pdf)
39-
- [ ] Braginsky, Anastasia, and Erez Petrank. "A lock-free B+ tree." Proceedings of the twenty-fourth annual ACM symposium on Parallelism in algorithms and architectures. ACM, 2012. [PDF](http://www.cs.technion.ac.il/~erez/Papers/lfbtree-full.pdf)
40-
- [ ] Kim, Jong Ho, Helen Cameron, and Peter Graham. "Lock-free red-black trees using cas." Concurrency and Computation: Practice and experience (2006): 1-40. [PDF](https://www.cs.umanitoba.ca/~hacamero/Research/RBTreesKim.pdf)
10+
```
11+
import "golang.design/x/lockfree"
12+
```
4113

42-
### Hash
14+
## Contributing
4315

44-
- [ ] Michael, Maged M. "High performance dynamic lock-free hash tables and list-based sets." Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures. ACM, 2002. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.5854&rep=rep1&type=pdf)
16+
We would love to have your experiences. Feel free to [submit an issue](https://golang.design/x/lockfree/issues/new) for requesting a new implementation or bug report.
4517

4618
## License
4719

TODO.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TODO LIST
2+
3+
## List of Algorithms
4+
5+
### Linked List
6+
7+
- [ ] Harris, Timothy L. "A pragmatic implementation of non-blocking linked-lists." International Symposium on Distributed Computing. Springer, Berlin, Heidelberg, 2001. [PDF](https://pdfs.semanticscholar.org/68a9/005a5ec10daece36ca5ecb9cad7be44770b1.pdf)
8+
- [ ] Sundell, Hakan, and Philippas Tsigas. "Lock-Free and Practical Deques and Doubly Linked Lists using Single-Word Compare-And-Swap." 2004 [PDF](https://pdfs.semanticscholar.org/8a68/f45bd32ed050a96faa24139ab71178258f13.pdf)
9+
- [ ] Valois, John D. "Lock-free linked lists using compare-and-swap." PODC. Vol. 95. 1995. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.41.9506&rep=rep1&type=pdf)
10+
11+
### Queue
12+
13+
- [x] Maged M. Michael and Michael L. Scott. 1996. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proceedings of the fifteenth annual ACM symposium on Principles of distributed computing (PODC '96). ACM, New York, NY, USA, 267-275. [PDF](https://apps.dtic.mil/dtic/tr/fulltext/u2/a309412.pdf)
14+
- [ ] Shann, Chien-Hua, Ting-Lu Huang, and Cheng Chen. "A practical nonblocking queue algorithm using compare-and-swap." Proceedings Seventh International Conference on Parallel and Distributed Systems (Cat. No. PR00568). IEEE, 2000. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.199.7928&rep=rep1&type=pdf)
15+
- [ ] Fober, Dominique, Yann Orlarey, and Stéphane Letz. "Optimised lock-free FIFO queue." (2001). [PDF](https://hal.archives-ouvertes.fr/hal-02158792/document)
16+
- [ ] Evequoz, Claude. "Non-blocking concurrent fifo queues with single word synchronization primitives." 2008 37th International Conference on Parallel Processing. IEEE, 2008. [PDF](https://www.liblfds.org/downloads/white%20papers/%5BQueue%5D%20-%20%5BEvequoz%5D%20-%20Non-Blocking%20Concurrent%20FIFO%20Queues%20With%20Single%20Word%20Synchroniation%20Primitives.pdf)
17+
18+
### Skip-list
19+
20+
- [ ] Fomitchev, Mikhail, and Eric Ruppert. "Lock-free linked lists and skip lists." Proceedings of the twenty-third annual ACM symposium on Principles of distributed computing. ACM, 2004. [PDF](http://people.scs.carleton.ca/~edwardduong/PDF_files_of_relevant_papers/2004%20-%20Lock-free%20Linked%20List%20and%20Skip%20Lists.pdf)
21+
- [ ] Herlihy, Maurice, et al. "A provably correct scalable concurrent skip list." Conference On Principles of Distributed Systems (OPODIS). 2006. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.170.719&rep=rep1&type=pdf)
22+
23+
### Stack
24+
25+
- [ ] Hendler, Danny, Nir Shavit, and Lena Yerushalmi. "A scalable lock-free stack algorithm." Proceedings of the sixteenth annual ACM symposium on Parallelism in algorithms and architectures. ACM, 2004. [PDF](http://www.inf.ufsc.br/~dovicchi/pos-ed/pos/artigos/p206-hendler.pdf)
26+
27+
### Tree
28+
29+
- [ ] Bronson, Nathan G., et al. "A practical concurrent binary search tree." ACM Sigplan Notices. Vol. 45. No. 5. ACM, 2010. [PDF](http://www.academia.edu/download/42135309/ppopp207-bronson.pdf)
30+
- [ ] Braginsky, Anastasia, and Erez Petrank. "A lock-free B+ tree." Proceedings of the twenty-fourth annual ACM symposium on Parallelism in algorithms and architectures. ACM, 2012. [PDF](http://www.cs.technion.ac.il/~erez/Papers/lfbtree-full.pdf)
31+
- [ ] Kim, Jong Ho, Helen Cameron, and Peter Graham. "Lock-free red-black trees using cas." Concurrency and Computation: Practice and experience (2006): 1-40. [PDF](https://www.cs.umanitoba.ca/~hacamero/Research/RBTreesKim.pdf)
32+
33+
### Hash
34+
35+
- [ ] Michael, Maged M. "High performance dynamic lock-free hash tables and list-based sets." Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures. ACM, 2002. [PDF](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.5854&rep=rep1&type=pdf)

arithmetic.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2020 The golang.design Initiative authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
15
package lockfree
26

37
import (

arithmetic_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
// Copyright 2020 The golang.design Initiative authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
15
package lockfree_test
26

37
import (
48
"sync"
59
"testing"
610

7-
"github.com/changkun/lockfree"
11+
"golang.design/x/lockfree"
812
)
913

1014
func TestAddFloat64(t *testing.T) {

common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2020 The golang.design Initiative authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
15
package lockfree
26

37
import (

doc.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
// Copyright 2020 The golang.design Initiative authors.
2+
// All rights reserved. Use of this source code is governed
3+
// by a MIT license that can be found in the LICENSE file.
4+
15
// Package lockfree offers lock-free utilities
2-
package lockfree
6+
//
7+
// Note that this package is under development and not for production use.
8+
package lockfree // import "golang.design/x/lockfree"

0 commit comments

Comments
 (0)