]> Cypherpunks repositories - gostls13.git/commit
sync: internal fixed size lock-free queue for sync.Pool
authorAustin Clements <austin@google.com>
Fri, 1 Mar 2019 18:16:37 +0000 (13:16 -0500)
committerAustin Clements <austin@google.com>
Fri, 5 Apr 2019 18:49:03 +0000 (18:49 +0000)
commit2b605670020fc637e20a609b1dc86c1f0e7afdd1
treefa5ecc1c95a04fe0c1009fd6d1702aec631df295
parente47ced78578c471cbcd34a7d6b223a71e84a46c8
sync: internal fixed size lock-free queue for sync.Pool

This is the first step toward fixing multiple issues with sync.Pool.
This adds a fixed size, lock-free, single-producer, multi-consumer
queue that will be used in the new Pool stealing implementation.

For #22950, #22331.

Change-Id: I50e85e3cb83a2ee71f611ada88e7f55996504bb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/166957
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/sync/export_test.go
src/sync/pool_test.go
src/sync/poolqueue.go [new file with mode: 0644]