Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 248 for Read (0.19 sec)

  1. cmd/namespace-lock.go

    }
    
    // Unlock - block until write lock is released.
    func (di *distLockInstance) Unlock(lc LockContext) {
    	if lc.cancel != nil {
    		lc.cancel()
    	}
    	di.rwMutex.Unlock(lc.ctx)
    }
    
    // RLock - block until read lock is taken or timeout has occurred.
    func (di *distLockInstance) GetRLock(ctx context.Context, timeout *dynamicTimeout) (LockContext, error) {
    	lockSource := getSource(2)
    	start := UTCNow()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  2. cni/pkg/repair/netns.go

    	if err != nil {
    		return "", fmt.Errorf("network id: %v", err)
    	}
    	fs, err := procfs.NewFS("/host/proc")
    	if err != nil {
    		return "", fmt.Errorf("read procfs: %v", err)
    	}
    	procs, err := fs.AllProcs()
    	if err != nil {
    		return "", fmt.Errorf("read procs: %v", err)
    	}
    	oldest := uint64(math.MaxUint64)
    	best := ""
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Dec 20 22:14:13 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. src/bufio/scan.go

    			s.buf = newBuf
    			s.end -= s.start
    			s.start = 0
    		}
    		// Finally we can read some input. Make sure we don't get stuck with
    		// a misbehaving Reader. Officially we don't need to do this, but let's
    		// be extra careful: Scanner is for safe, simple jobs.
    		for loop := 0; ; {
    			n, err := s.r.Read(s.buf[s.end:len(s.buf)])
    			if n < 0 || len(s.buf)-s.end < n {
    				s.setErr(ErrBadReadCount)
    				break
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  4. internal/http/request-recorder.go

    	buf bytes.Buffer
    	// total bytes read including header size
    	bytesRead int
    }
    
    // Close is a no operation closer
    func (r *RequestRecorder) Close() error {
    	// no-op
    	return nil
    }
    
    // Read reads from the internal reader and counts/save the body in the memory
    func (r *RequestRecorder) Read(p []byte) (n int, err error) {
    	n, err = r.Reader.Read(p)
    	r.bytesRead += n
    
    	if r.LogBody {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 12 21:37:19 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  5. internal/dsync/dsync-server_test.go

    		return false, fmt.Errorf("RUnlock attempted on a write locked entity: %s", args.Resources[0])
    	}
    	if locksHeld > ReadLock {
    		l.lockMap[args.Resources[0]] = locksHeld - ReadLock // Remove one of the read locks held
    	} else {
    		delete(l.lockMap, args.Resources[0]) // Remove the (last) read lock
    	}
    	return reply, nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  6. internal/s3select/simdj/reader_amd64_test.go

    				}
    			}
    			refDec := json.NewReader(io.NopCloser(bytes.NewBuffer(ref)), &json.ReaderArgs{ContentType: "json"})
    
    			for {
    				rec, err := dec.Read(nil)
    				if err == io.EOF {
    					break
    				}
    				if err != nil {
    					t.Error(err)
    				}
    				want, err := refDec.Read(nil)
    				if err != nil {
    					t.Error(err)
    				}
    				var gotB, wantB bytes.Buffer
    				opts := sql.WriteCSVOpts{
    					FieldDelimiter: ',',
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  7. cmd/streaming-signature-v4.go

    var errChunkTooBig = errors.New("chunk too big: choose chunk size <= 16MiB")
    
    // newSignV4ChunkedReader returns a new s3ChunkedReader that translates the data read from r
    // out of HTTP "chunked" format before returning it.
    // The s3ChunkedReader returns io.EOF when the final 0-length chunk is read.
    //
    // NewChunkedReader is not needed by normal applications. The http package
    // automatically decodes chunking when reading response bodies.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  8. internal/lsync/lrwmutex.go

    }
    
    // RLock holds a read lock on lm.
    //
    // If one or more read lock are already in use, it will grant another lock.
    // Otherwise the calling go routine blocks until the mutex is available.
    func (lm *LRWMutex) RLock() {
    	const isWriteLock = false
    	lm.lockLoop(context.Background(), lm.id, lm.source, 1<<63-1, isWriteLock)
    }
    
    // GetRLock tries to get a read lock on lm before the timeout occurs.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  9. src/bytes/reader_test.go

    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 10)); err != nil || n != 10 {
    		t.Errorf("Read failed: read %d %v", n, err)
    	}
    	if got, want := r.Len(), 1; got != want {
    		t.Errorf("r.Len(): got %d, want %d", got, want)
    	}
    	if n, err := r.Read(make([]byte, 1)); err != nil || n != 1 {
    		t.Errorf("Read failed: read %d %v; want 1, nil", n, err)
    	}
    	if got, want := r.Len(), 0; got != want {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  10. docs/debugging/inspect/export.go

    				// Read metadata CRC (added in v2, ignore if not found)
    				b = nbuf
    			}
    
    			_, e = msgp.CopyToJSON(buf, bytes.NewReader(v))
    			if e != nil {
    				return nil, e
    			}
    			data = b
    		case 3:
    			v, b, e := msgp.ReadBytesZC(b)
    			if e != nil {
    				return nil, e
    			}
    			if _, nbuf, e := msgp.ReadUint32Bytes(b); e == nil {
    				// Read metadata CRC (added in v2, ignore if not found)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 08 15:58:02 GMT 2022
    - 9.1K bytes
    - Viewed (0)
Back to top