A resource pool implementation which returns handles from the registered resource locations in a round robin fashion.
| 23 | // A resource pool implementation which returns handles from the registered |
| 24 | // resource locations in a round robin fashion. |
| 25 | type roundRobinResourcePool struct { |
| 26 | options Options |
| 27 | |
| 28 | createPool func(Options) ResourcePool |
| 29 | |
| 30 | rwMutex sync.RWMutex |
| 31 | isLameDuck bool |
| 32 | pools []*ResourceLocationPool |
| 33 | |
| 34 | counter *int64 // atomic counter |
| 35 | } |
| 36 | |
| 37 | // This returns a RoundRobinResourcePool. |
| 38 | func NewRoundRobinResourcePool( |
nothing calls this directly
no outgoing calls
no test coverage detected