Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for waiters (0.17 sec)

  1. src/sync/mutex.go

    	// the unlocking goroutine to the waiter at the front of the queue.
    	// New arriving goroutines don't try to acquire the mutex even if it appears
    	// to be unlocked, and don't try to spin. Instead they queue themselves at
    	// the tail of the wait queue.
    	//
    	// If a waiter receives ownership of the mutex and sees that either
    	// (1) it is the last waiter in the queue, or (2) it waited for less than 1 ms,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. src/sync/waitgroup.go

    	}
    	// This goroutine has set counter to 0 when waiters > 0.
    	// Now there can't be concurrent mutations of state:
    	// - Adds must not happen concurrently with Wait,
    	// - Wait does not increment waiters if it sees counter == 0.
    	// Still do a cheap sanity check to detect WaitGroup misuse.
    	if wg.state.Load() != state {
    		panic("sync: WaitGroup misuse: Add called concurrently with Wait")
    	}
    	// Reset waiters count to 0.
    	wg.state.Store(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4K bytes
    - Viewed (0)
  3. src/internal/trace/raw/writer.go

    // NewWriter creates a new byte format writer.
    func NewWriter(w io.Writer, v version.Version) (*Writer, error) {
    	_, err := version.WriteHeader(w, v)
    	return &Writer{w: w, v: v, specs: v.Specs()}, err
    }
    
    // WriteEvent writes a single event to the trace wire format stream.
    func (w *Writer) WriteEvent(e Event) error {
    	// Check version.
    	if e.Version != w.v {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. src/mime/multipart/writer.go

    	"errors"
    	"fmt"
    	"io"
    	"net/textproto"
    	"slices"
    	"strings"
    )
    
    // A Writer generates multipart messages.
    type Writer struct {
    	w        io.Writer
    	boundary string
    	lastpart *part
    }
    
    // NewWriter returns a new multipart [Writer] with a random boundary,
    // writing to w.
    func NewWriter(w io.Writer) *Writer {
    	return &Writer{
    		w:        w,
    		boundary: randomBoundary(),
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/phases/init/waitcontrolplane.go

    		return handleError(err)
    	}
    
    	waiter.SetTimeout(data.Cfg().Timeouts.ControlPlaneComponentHealthCheck.Duration)
    	if features.Enabled(data.Cfg().ClusterConfiguration.FeatureGates, features.WaitForAllControlPlaneComponents) {
    		err = waiter.WaitForControlPlaneComponents(&data.Cfg().ClusterConfiguration)
    	} else {
    		err = waiter.WaitForAPI()
    	}
    	if err != nil {
    		return handleError(err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. cmd/erasure-encode.go

    }
    
    // Encode reads from the reader, erasure-encodes the data and writes to the writers.
    func (e *Erasure) Encode(ctx context.Context, src io.Reader, writers []io.Writer, buf []byte, quorum int) (total int64, err error) {
    	writer := &multiWriter{
    		writers:     writers,
    		writeQuorum: quorum,
    		errs:        make([]error, len(writers)),
    	}
    
    	for {
    		var blocks [][]byte
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/dryrun/dryrun.go

    	}
    	return errorsutil.NewAggregate(errs)
    }
    
    // Waiter is an implementation of apiclient.Waiter that should be used for dry-running
    type Waiter struct{}
    
    // NewWaiter returns a new Waiter object that talks to the given Kubernetes cluster
    func NewWaiter() apiclient.Waiter {
    	return &Waiter{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  8. cmd/erasure-decode.go

    }
    
    // Decode reads from readers, reconstructs data if needed and writes the data to the writer.
    // A set of preferred drives can be supplied. In that case they will be used and the data reconstructed.
    func (e Erasure) Decode(ctx context.Context, writer io.Writer, readers []io.ReaderAt, offset, length, totalLength int64, prefer []bool) (written int64, derr error) {
    	if offset < 0 || length < 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 21 14:36:21 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  9. src/sync/rwmutex.go

    //
    // [the Go memory model]: https://go.dev/ref/mem
    type RWMutex struct {
    	w           Mutex        // held if there are pending writers
    	writerSem   uint32       // semaphore for writers to wait for completing readers
    	readerSem   uint32       // semaphore for readers to wait for completing writers
    	readerCount atomic.Int32 // number of pending readers
    	readerWait  atomic.Int32 // number of departing readers
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  10. src/runtime/tracetype.go

    	// Insert the pointer to the type itself.
    	id, _ := t.tab.put(noescape(unsafe.Pointer(&typ)), goarch.PtrSize)
    	return id
    }
    
    // dump writes all previously cached types to trace buffers and
    // releases all memory and resets state. It must only be called once the caller
    // can guarantee that there are no more writers to the table.
    func (t *traceTypeTable) dump(gen uintptr) {
    	w := unsafeTraceExpWriter(gen, nil, traceExperimentAllocFree)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top