Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewPipe (0.21 sec)

  1. src/internal/poll/export_linux_test.go

    // Since testing imports os and os imports internal/poll,
    // the internal/poll tests can not be in package poll.
    
    package poll
    
    var (
    	GetPipe     = getPipe
    	PutPipe     = putPipe
    	NewPipe     = newPipe
    	DestroyPipe = destroyPipe
    )
    
    func GetPipeFds(p *SplicePipe) (int, int) {
    	return p.rfd, p.wfd
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 10 03:52:48 UTC 2021
    - 527 bytes
    - Viewed (0)
  2. src/internal/poll/splice_linux_test.go

    			if err != nil {
    				continue
    			}
    			poll.PutPipe(p)
    		}
    	})
    	b.Run("SplicePipeWithoutPool", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			p := poll.NewPipe()
    			if p == nil {
    				b.Skip("newPipe returned nil")
    			}
    			poll.DestroyPipe(p)
    		}
    	})
    }
    
    func BenchmarkSplicePipePoolParallel(b *testing.B) {
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. src/internal/poll/splice_linux.go

    	// redirecting the data transmission to the conventional way utilizing read() + write() as a fallback.
    	p := newPipe()
    	if p == nil {
    		return nil
    	}
    	runtime.SetFinalizer(p, destroyPipe)
    	return p
    }
    
    // getPipe tries to acquire a pipe buffer from the pool or create a new one with newPipe() if it gets nil from the cache.
    func getPipe() (*splicePipe, error) {
    	v := splicePipePool.Get()
    	if v == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top