(batch *writeBatch)
| 934 | } |
| 935 | |
| 936 | func (b *batchQueue) Put(batch *writeBatch) bool { |
| 937 | b.cond.L.Lock() |
| 938 | defer b.cond.L.Unlock() |
| 939 | defer b.cond.Broadcast() |
| 940 | |
| 941 | if b.closed { |
| 942 | return false |
| 943 | } |
| 944 | b.queue = append(b.queue, batch) |
| 945 | return true |
| 946 | } |
| 947 | |
| 948 | func (b *batchQueue) Get() *writeBatch { |
| 949 | b.cond.L.Lock() |
no outgoing calls