Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 25 of 25 for rwmutex (0.17 sec)

  1. src/cmd/cgo/internal/test/callback.go

    */
    import "C"
    
    import (
    	"path"
    	"runtime"
    	"strings"
    	"sync"
    	"testing"
    	"unsafe"
    )
    
    // Pass a func value from nestedCall to goCallback using an integer token.
    var callbackMutex sync.Mutex
    var callbackToken int
    var callbackFuncs = make(map[int]func())
    
    // nestedCall calls into C, back into Go, and finally to f.
    func nestedCall(f func()) {
    	// callback(x) calls goCallback(x)
    	callbackMutex.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 111.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    	var res interface{}
    	if err := d.Decode(&res); err != nil {
    		panic(err)
    	}
    	return res
    }
    
    type warningRecorder struct {
    	mu       sync.Mutex
    	warnings []string
    }
    
    // AddWarning adds a warning to recorder.
    func (r *warningRecorder) AddWarning(agent, text string) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	r.warnings = append(r.warnings, text)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if !reflect.DeepEqual(s, s2) {
    		t.Fatalf("encode/decode broken:\n%#v\n%#v\n", s, s2)
    	}
    }
    
    type SimpleRESTStorage struct {
    	lock sync.Mutex
    
    	errors map[string]error
    	list   []genericapitesting.Simple
    	item   genericapitesting.Simple
    
    	updated *genericapitesting.Simple
    	created *genericapitesting.Simple
    
    	stream *SimpleStream
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 20:15:22 UTC 2023
    - 158.7K bytes
    - Viewed (0)
  4. cmd/object-handlers_test.go

    	credentials auth.Credentials, t *testing.T,
    ) {
    	// used for storing the uploadID's parsed on concurrent HTTP requests for NewMultipart upload on the same object.
    	testUploads := struct {
    		sync.Mutex
    		uploads []string
    	}{}
    
    	objectName := "test-object-new-multipart-parallel"
    	var wg sync.WaitGroup
    	for i := 0; i < 10; i++ {
    		wg.Add(1)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 161.9K bytes
    - Viewed (0)
  5. src/reflect/all_test.go

    // If the selectWatcher notices that the select has been blocked for >1 second, it prints
    // an error describing the select and panics the entire test binary.
    var selectWatch struct {
    	sync.Mutex
    	once sync.Once
    	now  time.Time
    	info []caseInfo
    }
    
    func selectWatcher() {
    	for {
    		time.Sleep(1 * time.Second)
    		selectWatch.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top