]> Cypherpunks repositories - gostls13.git/commit
sync: Proposal for barrier implementation
authorGustavo Niemeyer <gustavo@niemeyer.net>
Thu, 3 Feb 2011 20:39:11 +0000 (12:39 -0800)
committerRob Pike <r@golang.org>
Thu, 3 Feb 2011 20:39:11 +0000 (12:39 -0800)
commit63457d089ea4aebe35223dc6b70feae804a6a926
treed370a6eee68d76378769a8adedbb008ce375d360
parent838b5ad9d6ead0c4348197978fb85647a7019013
sync: Proposal for barrier implementation

As discussed in the mailing list, this adds a simple barrier
implementation to the sync package which enables one or more
goroutines to wait for a counter to go down to zero.

R=rsc, rog, r
CC=golang-dev
https://golang.org/cl/3770045
src/pkg/sync/Makefile
src/pkg/sync/mutex.go
src/pkg/sync/waitgroup.go [new file with mode: 0644]
src/pkg/sync/waitgroup_test.go [new file with mode: 0644]