Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for oldStat (0.14 sec)

  1. src/os/os_unix_test.go

    func TestReaddirRemoveRace(t *testing.T) {
    	oldStat := *LstatP
    	defer func() { *LstatP = oldStat }()
    	*LstatP = func(name string) (FileInfo, error) {
    		if strings.HasSuffix(name, "some-file") {
    			// Act like it's been deleted.
    			return nil, ErrNotExist
    		}
    		return oldStat(name)
    	}
    	dir := newDir("TestReaddirRemoveRace", t)
    	defer RemoveAll(dir)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:32:43 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/term/term.go

    // commonly found on UNIX systems.
    //
    // Putting a terminal into raw mode is the most common requirement:
    //
    //	oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
    //	if err != nil {
    //	        panic(err)
    //	}
    //	defer term.Restore(int(os.Stdin.Fd()), oldState)
    //
    // Note that on non-Unix systems os.Stdin.Fd() may not be 0.
    package term
    
    // State contains the state of a terminal.
    type State struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 22:24:28 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. platforms/core-runtime/build-operations/src/main/java/org/gradle/internal/operations/CurrentBuildOperationRef.java

            BuildOperationRef oldState = get();
            try {
                set(state);
                return block.call();
            } finally {
                set(oldState);
            }
        }
    
        public void with(@Nullable BuildOperationRef state, Runnable block) {
            BuildOperationRef oldState = get();
            try {
                set(state);
                block.run();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 13:09:36 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. src/internal/trace/resources.go

    	// we don't need fields for every kind of resource.
    	id       int64
    	oldState uint8
    	newState uint8
    }
    
    func goStateTransition(id GoID, from, to GoState) StateTransition {
    	return StateTransition{
    		Resource: ResourceID{Kind: ResourceGoroutine, id: int64(id)},
    		oldState: uint8(from),
    		newState: uint8(to),
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/cmd/pprof/readlineui.go

    	if v := strings.ToLower(os.Getenv("TERM")); v == "" || v == "dumb" {
    		return nil
    	}
    	// test if we can use term.ReadLine
    	// that assumes operation in the raw mode.
    	oldState, err := term.MakeRaw(0)
    	if err != nil {
    		return nil
    	}
    	term.Restore(0, oldState)
    
    	rw := struct {
    		io.Reader
    		io.Writer
    	}{os.Stdin, os.Stderr}
    	return &readlineUI{term: term.NewTerminal(rw, "")}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 30 18:10:36 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/term/term_unix.go

    	return err == nil
    }
    
    func makeRaw(fd int) (*State, error) {
    	termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
    	if err != nil {
    		return nil, err
    	}
    
    	oldState := State{state{termios: *termios}}
    
    	// This attempts to replicate the behaviour documented for cfmakeraw in
    	// the termios(3) manpage.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  7. platforms/software/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/results/StateTrackingTestResultProcessor.java

                parent = executing.get(event.getParentId()).test;
            }
            TestState state = new TestState(new DecoratingTestDescriptor(test, parent), event, executing);
            TestState oldState = executing.put(test.getId(), state);
            if (oldState != null) {
                throw new IllegalArgumentException(String.format("Received a start event for %s with duplicate id '%s'.",
                        test, test.getId()));
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  8. src/net/http/httptest/server.go

    				// never be used).
    				s.closeConn(c)
    			}
    		case http.StateActive:
    			if oldState, ok := s.conns[c]; ok {
    				if oldState != http.StateNew && oldState != http.StateIdle {
    					panic("invalid state transition")
    				}
    				s.conns[c] = cs
    			}
    		case http.StateIdle:
    			if oldState, ok := s.conns[c]; ok {
    				if oldState != http.StateActive {
    					panic("invalid state transition")
    				}
    				s.conns[c] = cs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. pkg/kubelet/pleg/generic.go

    	}
    	return true, nil
    }
    
    func generateEvents(podID types.UID, cid string, oldState, newState plegContainerState) []*PodLifecycleEvent {
    	if newState == oldState {
    		return nil
    	}
    
    	klog.V(4).InfoS("GenericPLEG", "podUID", podID, "containerID", cid, "oldState", oldState, "newState", newState)
    	switch newState {
    	case plegContainerRunning:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/text/internal/language/parse.go

    		s.err = e
    	}
    }
    
    // resizeRange shrinks or grows the array at position oldStart such that
    // a new string of size newSize can fit between oldStart and oldEnd.
    // Sets the scan point to after the resized range.
    func (s *scanner) resizeRange(oldStart, oldEnd, newSize int) {
    	s.start = oldStart
    	if end := oldStart + newSize; end != oldEnd {
    		diff := end - oldEnd
    		var b []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 14.9K bytes
    - Viewed (0)
Back to top