- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for concurrence (0.56 sec)
-
src/context/benchmark_test.go
for i := 0; i < 100; i++ { x /= x + 1 } } }) } func BenchmarkWithTimeout(b *testing.B) { for concurrency := 40; concurrency <= 4e5; concurrency *= 100 { name := fmt.Sprintf("concurrency=%d", concurrency) b.Run(name, func(b *testing.B) { benchmarkWithTimeout(b, concurrency) }) } } func benchmarkWithTimeout(b *testing.B, concurrentContexts int) { gomaxprocs := runtime.GOMAXPROCS(0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 02 00:44:24 UTC 2021 - 3.8K bytes - Viewed (0) -
src/cmd/go/testdata/script/mod_concurrent.txt
env GO111MODULE=on # Concurrent builds should succeed, even if they need to download modules. go get ./x ./y go build ./x & go build ./y wait # Concurrent builds should update go.sum to the union of the hashes for the # modules they read. cmp go.sum go.sum.want -- go.mod -- module golang.org/issue/26794 require ( golang.org/x/text v0.3.0 rsc.io/sampler v1.0.0 ) -- x/x.go -- package x
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 28 17:19:14 UTC 2021 - 800 bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
} // A sequencer performs concurrent tasks that may write output, but emits that // output in a deterministic order. type sequencer struct { maxWeight int64 sem *semaphore.Weighted // weighted by input bytes (an approximate proxy for memory overhead) prev <-chan *reporterState // 1-buffered } // newSequencer returns a sequencer that allows concurrent tasks up to maxWeight
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/doc.go
// and both are correct. // // The next example uses a go statement and has a similar problem [<go1.22]. // In addition, it has a data race because the loop updates v // concurrent with the goroutines accessing it. // // for _, v := range elem { // go func() { // use(v) // incorrect, and a data race // }() // } //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 21:52:54 UTC 2023 - 2.6K bytes - Viewed (0) -
src/cmd/go/internal/modcmd/download.go
// if any download failed due to a TooNewError, we switch toolchains and try // again. Any downloads that already succeeded will still be in cache. // That won't give optimal concurrency (we'll do two batches of concurrent // downloads instead of all in one batch), and it might add a little overhead // to look up the downloads from the first batch in the module cache when
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 19:32:39 UTC 2023 - 13.5K bytes - Viewed (0) -
src/bufio/bufio.go
b.lastRuneSize = -1 return nil } // Buffered returns the number of bytes that can be read from the current buffer. func (b *Reader) Buffered() int { return b.w - b.r } // ReadSlice reads until the first occurrence of delim in the input, // returning a slice pointing at the bytes in the buffer. // The bytes stop being valid at the next read. // If ReadSlice encounters an error before finding a delimiter,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/cmd/go/testdata/script/mod_replace.txt
stdout 'Don''t communicate by sharing memory' # Modules can be replaced by local packages. cp go.mod.orig go.mod go mod edit -replace=rsc.io/quote/v3=./local/rsc.io/quote/v3 go build -o a2.exe . exec ./a2.exe stdout 'Concurrency is not parallelism.' # The module path of the replacement doesn't need to match. # (For example, it could be a long-running fork with its own import path.) cp go.mod.orig go.mod
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 28 17:19:14 UTC 2021 - 3.7K bytes - Viewed (0) -
src/cmd/internal/test2json/test2json.go
// writing to a single underlying output stream w. // As long as the underlying output w can handle concurrent writes // from multiple goroutines, the result will be a JSON stream // describing the relative ordering of execution in all the concurrent tests. // // The mode flag adjusts the behavior of the converter. // Passing ModeTime includes event timestamps and elapsed times. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 17:33:07 UTC 2022 - 14.5K bytes - Viewed (0) -
src/context/example_test.go
// we need to make sure we wake up exactly this one. // That means that we need to Broadcast to all of the goroutines, // which will wake them all up. // // If there are N concurrent calls to waitOnCond, each of the goroutines // will spuriously wake up O(N) other goroutines that aren't ready yet, // so this will cause the overall CPU cost to be O(N²). cond.Broadcast() }) defer stopf()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 21 20:24:28 UTC 2023 - 6.7K bytes - Viewed (0) -
misc/cgo/gmp/fib.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore // Compute Fibonacci numbers with two goroutines // that pass integers back and forth. No actual // concurrency, just threads and synchronization // and foreign code on multiple pthreads. package main import ( big "." "runtime" ) func fibber(c chan *big.Int, out chan string, n int64) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 919 bytes - Viewed (0)