Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 2,479 for deer (0.09 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

    	err := func() error {
    		s.lock.Lock()
    		defer s.lock.Unlock()
    		if s.Errors > 0 {
    			s.Errors--
    			return fmt.Errorf("injected error")
    		}
    		return nil
    	}()
    	if err != nil {
    		return err
    	}
    	return s.Interface.GetList(ctx, key, opts, listObj)
    }
    
    func (s *StorageInjectingListErrors) ErrorsConsumed() (bool, error) {
    	s.lock.Lock()
    	defer s.lock.Unlock()
    	return s.Errors == 0, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 07:26:55 UTC 2024
    - 10.3K bytes
    - Viewed (1)
  2. src/syscall/pwd_plan9.go

    }
    
    func Chdir(path string) error {
    	// If Chdir is to a relative path, sync working dir first
    	if fixwd(path) {
    		defer runtime.UnlockOSThread()
    	}
    	wdmu.Lock()
    	defer wdmu.Unlock()
    
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    	if err := chdir(path); err != nil {
    		return err
    	}
    
    	wd, err := getwd()
    	if err != nil {
    		return err
    	}
    	wdSet = true
    	wdStr = wd
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. pkg/kubelet/pod/testing/fake_mirror_client.go

    	fmc.mirrorPodLock.RLock()
    	defer fmc.mirrorPodLock.RUnlock()
    	return fmc.mirrorPods.Has(podFullName)
    }
    
    func (fmc *FakeMirrorClient) NumOfPods() int {
    	fmc.mirrorPodLock.RLock()
    	defer fmc.mirrorPodLock.RUnlock()
    	return fmc.mirrorPods.Len()
    }
    
    func (fmc *FakeMirrorClient) GetPods() []string {
    	fmc.mirrorPodLock.RLock()
    	defer fmc.mirrorPodLock.RUnlock()
    	return sets.List(fmc.mirrorPods)
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. pkg/registry/registrytest/node.go

    }
    
    func (r *NodeRegistry) SetError(err error) {
    	r.Lock()
    	defer r.Unlock()
    	r.Err = err
    }
    
    func (r *NodeRegistry) ListNodes(ctx context.Context, options *metainternalversion.ListOptions) (*api.NodeList, error) {
    	r.Lock()
    	defer r.Unlock()
    	return &r.Nodes, r.Err
    }
    
    func (r *NodeRegistry) CreateNode(ctx context.Context, node *api.Node) error {
    	r.Lock()
    	defer r.Unlock()
    	r.Node = node.Name
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 23:13:50 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  5. src/cmd/go/internal/lockedfile/internal/filelock/filelock_test.go

    	t.Parallel()
    
    	f, remove := mustTempFile(t)
    	defer remove()
    
    	other := mustOpen(t, f.Name())
    	defer other.Close()
    
    	lock(t, f)
    	lockOther := mustBlock(t, "Lock", other)
    	unlock(t, f)
    	lockOther(t)
    	unlock(t, other)
    }
    
    func TestLockExcludesRLock(t *testing.T) {
    	t.Parallel()
    
    	f, remove := mustTempFile(t)
    	defer remove()
    
    	other := mustOpen(t, f.Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 06 22:37:50 UTC 2023
    - 4K bytes
    - Viewed (0)
  6. test/typeparam/issue47514c.dir/main.go

    package main
    
    import "./a"
    
    func Do[T any](doer a.Doer[T]) {
    	doer.Do()
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 91 bytes
    - Viewed (0)
  7. pkg/kubelet/cm/memorymanager/state/state_checkpoint.go

    func (sc *stateCheckpoint) GetMachineState() NUMANodeMap {
    	sc.RLock()
    	defer sc.RUnlock()
    
    	return sc.cache.GetMachineState()
    }
    
    // GetMemoryBlocks returns memory assignments of a container
    func (sc *stateCheckpoint) GetMemoryBlocks(podUID string, containerName string) []Block {
    	sc.RLock()
    	defer sc.RUnlock()
    
    	return sc.cache.GetMemoryBlocks(podUID, containerName)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 08 16:05:48 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/net/testing/http.go

    		return
    	}
    
    	var wg sync.WaitGroup
    	wg.Add(2)
    
    	go func() {
    		defer wg.Done()
    		defer h.t.Logf("Server read close, host=%s", req.Host)
    		io.Copy(conn, sconn)
    	}()
    	go func() {
    		defer wg.Done()
    		defer h.t.Logf("Server write close, host=%s", req.Host)
    		io.Copy(sconn, conn)
    	}()
    
    	wg.Wait()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 20 14:58:46 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. pkg/registry/registrytest/service.go

    	GottenID  string
    	UpdatedID string
    }
    
    func (r *ServiceRegistry) SetError(err error) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	r.Err = err
    }
    
    func (r *ServiceRegistry) ListServices(ctx context.Context, options *metainternalversion.ListOptions) (*api.ServiceList, error) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    
    	ns, _ := genericapirequest.NamespaceFrom(ctx)
    
    	// Copy metadata from internal list into result
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 13:43:36 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  10. pilot/pkg/util/runtime/runtime_test.go

    package runtime
    
    import (
    	"testing"
    	"time"
    )
    
    func TestHandleCrash(t *testing.T) {
    	defer func() {
    		if x := recover(); x != nil {
    			t.Errorf("Expected no panic ")
    		}
    	}()
    
    	defer HandleCrash()
    	panic("test")
    }
    
    func TestCustomHandleCrash(t *testing.T) {
    	ch := make(chan struct{}, 1)
    	defer func() {
    		select {
    		case <-ch:
    			t.Logf("crash handler called")
    		case <-time.After(1 * time.Second):
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 1.1K bytes
    - Viewed (0)
Back to top