Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 795 for racer (1.16 sec)

  1. src/runtime/race/race_test.go

    // license that can be found in the LICENSE file.
    
    //go:build race
    
    // This program is used to verify the race detector
    // by running the tests and parsing their output.
    // It does not check stack correctness, completeness or anything else:
    // it merely verifies that if a test is expected to be racy
    // then the race is detected.
    package race_test
    
    import (
    	"bufio"
    	"bytes"
    	"fmt"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6K bytes
    - Viewed (0)
  2. src/runtime/race/testdata/rangefunc_test.go

    		if i%5 == v {
    			break
    		}
    		asum.Add(x) // don't race on asum
    		runtime.Gosched()
    	}
    	return 100 + asum.Load()
    }
    
    // TestRaceRangeFuncIterator races because x%5 can be equal to 4,
    // therefore foo can early exit.
    func TestRaceRangeFuncIterator(t *testing.T) {
    	x := foo(4)
    	t.Logf("foo(4)=%d", x)
    }
    
    // TestNoRaceRangeFuncIterator does not race because x%5 is never 5,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. src/sync/rwmutex.go

    func (rw *RWMutex) TryLock() bool {
    	if race.Enabled {
    		_ = rw.w.state
    		race.Disable()
    	}
    	if !rw.w.TryLock() {
    		if race.Enabled {
    			race.Enable()
    		}
    		return false
    	}
    	if !rw.readerCount.CompareAndSwap(0, -rwmutexMaxReaders) {
    		rw.w.Unlock()
    		if race.Enabled {
    			race.Enable()
    		}
    		return false
    	}
    	if race.Enabled {
    		race.Enable()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  4. cmd/http-tracer.go

    Klaus Post <******@****.***> 1717429554 -0700
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 03 15:45:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. src/runtime/extern.go

    the GOMAXPROCS limit. This package's [GOMAXPROCS] function queries and changes
    the limit.
    
    The GORACE variable configures the race detector, for programs built using -race.
    See the [Race Detector article] for details.
    
    The GOTRACEBACK variable controls the amount of output generated when a Go
    program fails due to an unrecovered panic or an unexpected runtime condition.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  6. src/runtime/race/testdata/chan_test.go

    		done <- true
    	}()
    	x = <-c2 // ... write to x here
    	<-done
    }
    
    func TestNoRaceChanReadWriteAsync(t *testing.T) {
    	done := make(chan bool)
    	c1 := make(chan int, 10)
    	x := 0
    	go func() {
    		c1 <- x // read of x does not race with...
    		done <- true
    	}()
    	x = <-c1 // ... write to x here
    	<-done
    }
    
    func TestNoRaceProducerConsumerUnbuffered(t *testing.T) {
    	type Task struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 19:55:29 UTC 2023
    - 11K bytes
    - Viewed (0)
  7. src/runtime/debug_test.go

    // TODO: This test could be implemented on all (most?) UNIXes if we
    // added syscall.Tgkill more widely.
    
    // We skip all of these tests under race mode because our test thread
    // spends all of its time in the race runtime, which isn't a safe
    // point.
    
    //go:build (amd64 || arm64 || ppc64le) && linux && !race
    
    package runtime_test
    
    import (
    	"fmt"
    	"internal/abi"
    	"math"
    	"os"
    	"regexp"
    	"runtime"
    	"runtime/debug"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 15:08:04 UTC 2023
    - 8K bytes
    - Viewed (0)
  8. src/internal/trace/testdata/testprog/cpu-profile.go

    	}
    	*y = accum
    }
    
    var (
    	salt1 = 0
    )
    
    // The actual CPU hogging function.
    // Must not call other functions nor access heap/globals in the loop,
    // otherwise under race detector the samples will be in the race runtime.
    func cpuHog1(x int) int {
    	return cpuHog0(x, 1e5)
    }
    
    func cpuHog0(x, n int) int {
    	foo := x
    	for i := 0; i < n; i++ {
    		if i%1000 == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  9. src/runtime/tracemap.go

    			// much activity, or the map gets big and races to insert on
    			// the same node are much less likely.
    			if newNode == nil {
    				newNode = tab.newTraceMapNode(data, size, hash, tab.seq.Add(1))
    			}
    			if m.CompareAndSwapNoWB(nil, unsafe.Pointer(newNode)) {
    				return newNode.id, true
    			}
    			// Reload n. Because pointers are only stored once,
    			// we must have lost the race, and therefore n is not nil
    			// anymore.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  10. src/cmd/go/internal/vcweb/vcstest/vcstest_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	srv := httptest.NewServer(s)
    
    	// To check for data races in the handler, run the root handler to produce an
    	// overview of the script status at an arbitrary point during the test.
    	// (We ignore the output because the expected failure mode is a friendly stack
    	// dump from the race detector.)
    	t.Run("overview", func(t *testing.T) {
    		t.Parallel()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 16:04:21 UTC 2022
    - 3.9K bytes
    - Viewed (0)
Back to top