Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 65 for newConf (0.26 sec)

  1. src/sync/cond.go

    type Cond struct {
    	noCopy noCopy
    
    	// L is held while observing or changing the condition
    	L Locker
    
    	notify  notifyList
    	checker copyChecker
    }
    
    // NewCond returns a new Cond with Locker l.
    func NewCond(l Locker) *Cond {
    	return &Cond{L: l}
    }
    
    // Wait atomically unlocks c.L and suspends execution
    // of the calling goroutine. After later resuming execution,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. src/net/sendfile_test.go

    	"bytes"
    	"context"
    	"crypto/sha256"
    	"encoding/hex"
    	"errors"
    	"fmt"
    	"internal/poll"
    	"io"
    	"os"
    	"runtime"
    	"strconv"
    	"sync"
    	"testing"
    	"time"
    )
    
    const (
    	newton       = "../testdata/Isaac.Newton-Opticks.txt"
    	newtonLen    = 567198
    	newtonSHA256 = "d4a9ac22462b35e7821a4f2706c211093da678620a8f9997989ee7cf8d507bbd"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn_test.go

    	return server, serverAddr
    }
    
    func TestRawConn(t *testing.T) {
    	channels := []ChannelType{ReadWriteChannel, ReadWriteChannel, IgnoreChannel, ReadChannel, WriteChannel}
    	conn := NewConn(NewDefaultChannelProtocols(channels))
    
    	s, addr := newServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		conn.Open(w, req)
    	}))
    	defer s.Close()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ir/const.go

    	panic("unreachable")
    }
    
    var (
    	intZero     = constant.MakeInt64(0)
    	floatZero   = constant.ToFloat(intZero)
    	complexZero = constant.ToComplex(intZero)
    )
    
    // NewOne returns an OLITERAL representing 1 with the given type.
    func NewOne(pos src.XPos, typ *types.Type) Node {
    	var val constant.Value
    	switch {
    	case typ.IsInteger():
    		val = intOne
    	case typ.IsFloat():
    		val = floatOne
    	case typ.IsComplex():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 18:53:26 UTC 2023
    - 4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/op.go

    	return ValAndOff(int64(val)<<32 + int64(uint32(off)))
    }
    
    func (x ValAndOff) canAdd32(off int32) bool {
    	newoff := x.Off64() + int64(off)
    	return newoff == int64(int32(newoff))
    }
    func (x ValAndOff) canAdd64(off int64) bool {
    	newoff := x.Off64() + off
    	return newoff == int64(int32(newoff))
    }
    
    func (x ValAndOff) addOffset32(off int32) ValAndOff {
    	if !x.canAdd32(off) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 15:29:10 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress.go

    	pr := &conditionalProgressRequester{
    		clock:                clock,
    		requestWatchProgress: requestWatchProgress,
    		contextMetadata:      contextMetadata,
    	}
    	pr.cond = sync.NewCond(&pr.mux)
    	return pr
    }
    
    type WatchProgressRequester func(ctx context.Context) error
    
    type TickerFactory interface {
    	NewTimer(time.Duration) clock.Timer
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 24 09:56:38 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. src/internal/zstd/xxhash_test.go

    		}
    	}
    }
    
    func TestLargeXXHash(t *testing.T) {
    	if testing.Short() {
    		t.Skip("skipping expensive test in short mode")
    	}
    
    	data, err := os.ReadFile("../../testdata/Isaac.Newton-Opticks.txt")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	var xh xxhash64
    	xh.reset()
    	i := 0
    	for i < len(data) {
    		// Write varying amounts to test buffering.
    		c := i%4094 + 1
    		if i+c > len(data) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:34:06 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. src/internal/trace/testdata/testprog/stacks.go

    		case <-c2:
    		}
    	}()
    	var mu sync.Mutex
    	mu.Lock()
    	go func() { // func7
    		mu.Lock()
    		mu.Unlock()
    	}()
    	var wg sync.WaitGroup
    	wg.Add(1)
    	go func() { // func8
    		wg.Wait()
    	}()
    	cv := sync.NewCond(&sync.Mutex{})
    	go func() { // func9
    		cv.L.Lock()
    		cv.Wait()
    		cv.L.Unlock()
    	}()
    	ln, err := net.Listen("tcp", "127.0.0.1:0")
    	if err != nil {
    		log.Fatalf("failed to listen: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting.go

    	p := &countingPromise{
    		lock:          lock,
    		cond:          *sync.NewCond(lock),
    		activeCounter: activeCounter,
    		isSet:         initial != nil,
    		value:         initial,
    	}
    	if doneCh != nil {
    		activeCounter.Add(1) // count start of the following goroutine
    		go func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  10. src/math/cbrt.go

    	}
    
    	// new cbrt to 23 bits
    	r := t * t / x
    	s := C + r*t
    	t *= G + F/(s+E+D/s)
    
    	// chop to 22 bits, make larger than cbrt(x)
    	t = Float64frombits(Float64bits(t)&(0xFFFFFFFFC<<28) + 1<<30)
    
    	// one step newton iteration to 53 bits with error less than 0.667ulps
    	s = t * t // t*t is exact
    	r = x / s
    	w := t + t
    	r = (r - t) / (w + r) // r-s is exact
    	t = t + t*r
    
    	// restore the sign bit
    	if sign {
    		t = -t
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.3K bytes
    - Viewed (0)
Back to top