// Put puts the bufio.Writer back into the pool.
543410
func (bufPool *BufioWriterPool) Put(b *bufio.Writer) {
	b.Reset(nil)
	bufPool.pool.Put(b)
}
237338
func (ipp *intPoolPool) put(ip *intPool) {
	ipp.lock.Lock()
	defer ipp.lock.Unlock()

	if len(ipp.pools) < cap(ipp.pools) {
		ipp.pools = append(ipp.pools, ip)
	}
}
767689
func (tp *BytePool) Put(el []byte) {
	if cap(el) < 1 || cap(el) > tp.maxSize {
		return
	}
	el = el[:cap(el)]
	o := log2Floor(uint32(cap(el)))
	p := &tp.list_of_pools[o]
	p.mu.Lock()
	p.list = append(p.list, el)
	p.mu.Unlock()
}
355176
func (bk *Bucket) Put(k, v []byte) error {
	return bk.db.Update(func(tx *bolt.Tx) error {
		return tx.Bucket(bk.Name).Put(k, v)
	})
}
349227
func (c *FileCacher) Put(key string, val interface{}, expire int64) error {
	filename := c.filepath(key)
	item := &Item{val, time.Now().Unix(), expire}
	data, err := EncodeGob(item)
	if err != nil {
		return err
	}

	os.MkdirAll(filepath.Dir(filename), os.ModePerm)
	return ioutil.WriteFile(filename, data, os.ModePerm)
}
1082239
func (stream *AudioStream) Put(buf []byte) (err error) {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
	_buf := unsafe.Pointer(sliceHeader.Data)
	_len := C.int(len(buf))
	ret := int(C.SDL_AudioStreamPut(stream.cptr(), _buf, _len))
	err = errorFromInt(ret)
	return
}
708984
func (p *intPool) put(is ...*big.Int) {
	if len(p.pool.data) > poolLimit {
		return
	}
	for _, i := range is {
		// verifyPool is a build flag. Pool verification makes sure the integrity
		// of the integer pool by comparing values to a default value.
		if verifyPool {
			i.Set(checkVal)
		}
		p.pool.push(i)
	}
}
372589
func (wb *WriteBatch) Put(key, value []byte) {
	cKey := byteToChar(key)
	cValue := byteToChar(value)
	C.rocksdb_writebatch_put(wb.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)))
}
72110
func (b *bucket) Put(key, value []byte) error {
	if b.writable {
		return b.Bucket.Put(key, value)
	}
	return kv.ErrTxNotWritable
}
1028567
func (b *Bucket) Put(ctx context.Context, path string, data []byte, contType string, perm ACL, options Options) error {
	body := bytes.NewBuffer(data)
	return b.PutReader(ctx, path, body, int64(len(data)), contType, perm, options)
}
426164
func (ta KVProtoWriters) Put(key string, data proto.Message, opts ...PutOption) error {
	var wasError error
	for _, transport := range ta {
		err := transport.Put(key, data, opts...)
		if err != nil {
			wasError = err
		}
	}
	return wasError
}
1295355
func (b *Backend) Put(ctx context.Context, entry *physical.Entry) error {
	defer metrics.MeasureSince(metricPut, time.Now())

	// Pooling
	b.permitPool.Acquire()
	defer b.permitPool.Release()

	// Insert
	m := spanner.InsertOrUpdateMap(b.table, map[string]interface{}{
		"Key":   entry.Key,
		"Value": entry.Value,
	})
	if _, err := b.client.Apply(ctx, []*spanner.Mutation{m}); err != nil {
		return errwrap.Wrapf("failed to put data: {{err}}", err)
	}
	return nil
}
174351
func (kv *KV) Put(key, value []byte) error {
	return kv.db.Update(func(tx *buntdb.Tx) error {
		_, _, err := tx.Set(gkv.Btos(key), gkv.Btos(value), nil)
		return err
	})
}
128499
func (d *Datastore) Put(k ds.Key, val []byte) error {
	d.buffer[k] = op{value: val}
	if len(d.buffer) > d.maxBufferEntries {
		return d.Flush()
	}
	return nil
}
1104368
func PutWriter(w *Writer) {
	w.Reset(nil, 0, 0)
	writers.Put(w, w.Size())
}
1316786
func (kv *KV) Put(key, value []byte) error {
	return kv.db.Put(key, value, nil)
}
106740
func (p *cbPool) Put(obj interface{}) unsafe.Pointer {
	p.m.Lock()
	defer p.m.Unlock()
	for id, val := range p.indices {
		if val != 0 {
			continue
		}
		p.indices[id] = id + 1
		p.objects[id] = obj
		return unsafe.Pointer(&p.indices[id])
	}
	panic("cbPool storage exhausted")
}