(n int, constructor func() F)
| 43 | } |
| 44 | |
| 45 | func (rb *RingWriter[T, F]) Init(n int, constructor func() F) *RingWriter[T, F] { |
| 46 | rb.constructor = constructor |
| 47 | rb.Ring = rb.create(n) |
| 48 | rb.Size = n |
| 49 | rb.LastValue = rb.Value |
| 50 | rb.Value.StartWrite() |
| 51 | return rb |
| 52 | } |
| 53 | |
| 54 | func (rb *RingWriter[T, F]) Glow(size int) (newItem *Ring[F]) { |
| 55 | if size < rb.poolSize { |
nothing calls this directly
no test coverage detected