Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for bufioWriterPool (0.16 sec)

  1. internal/s3select/select.go

    	switch s3Select.Output.format {
    	case csvFormat:
    		// Use bufio Writer to prevent csv.Writer from allocating a new buffer.
    		bufioWriter := bufioWriterPool.Get().(*bufio.Writer)
    		defer func() {
    			bufioWriter.Reset(xioutil.Discard)
    			bufioWriterPool.Put(bufioWriter)
    		}()
    
    		bufioWriter.Reset(buf)
    		opts := sql.WriteCSVOpts{
    			FieldDelimiter: []rune(s3Select.Output.CSVArgs.FieldDelimiter)[0],
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 21K bytes
    - Viewed (0)
  2. src/net/http/server.go

    }
    func putCopyBuf(b []byte) {
    	if len(b) != copyBufPoolSize {
    		panic("trying to put back buffer of the wrong size in the copyBufPool")
    	}
    	copyBufPool.Put((*[copyBufPoolSize]byte)(b))
    }
    
    func bufioWriterPool(size int) *sync.Pool {
    	switch size {
    	case 2 << 10:
    		return &bufioWriter2kPool
    	case 4 << 10:
    		return &bufioWriter4kPool
    	}
    	return nil
    }
    
    // newBufioReader should be an internal detail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
Back to top