1
0
Fork 0
mirror of https://github.com/tmrts/go-patterns.git synced 2025-04-03 13:13:34 +03:00
This commit is contained in:
genewoo 2018-10-17 07:14:27 +00:00 committed by GitHub
commit bc51926caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,10 +29,10 @@ Given below is a simple lifecycle example on an object pool.
p := pool.New(2)
select {
case obj := <-p:
case obj := <-*p:
obj.Do( /*...*/ )
p <- obj
*p <- obj
default:
// No more objects left — retry later or fail
return