• Kevin Burke's avatar
    sync: add example for Pool · 9e2c3f4c
    Kevin Burke authored
    It was a little tricky to figure out how to go from the documentation
    to figuring out the best way to implement a Pool, so I thought I'd
    try to provide a simple example. The implementation is mostly taken
    from the fmt package.
    
    I'm not happy with the verbosity of the calls to WriteString() etc,
    but I wanted to provide a non-trivial example.
    
    Change-Id: Id33a8b6cbf8eb278f71e1f78e20205b436578606
    Reviewed-on: https://go-review.googlesource.com/24371Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    9e2c3f4c
Name
Last commit
Last update
..
atomic Loading commit data...
cond.go Loading commit data...
cond_test.go Loading commit data...
example_pool_test.go Loading commit data...
example_test.go Loading commit data...
export_test.go Loading commit data...
mutex.go Loading commit data...
mutex_test.go Loading commit data...
once.go Loading commit data...
once_test.go Loading commit data...
pool.go Loading commit data...
pool_test.go Loading commit data...
runtime.go Loading commit data...
runtime_sema_test.go Loading commit data...
rwmutex.go Loading commit data...
rwmutex_test.go Loading commit data...
waitgroup.go Loading commit data...
waitgroup_test.go Loading commit data...