- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 2,380 for ONCE (0.08 sec)
-
internal/ioutil/wait_pipe.go
"sync" ) // PipeWriter is similar to io.PipeWriter with wait group type PipeWriter struct { *io.PipeWriter once sync.Once done func() } // CloseWithError close with supplied error the writer end. func (w *PipeWriter) CloseWithError(err error) error { err = w.PipeWriter.CloseWithError(err) w.once.Do(func() { w.done() }) return err } // PipeReader is similar to io.PipeReader with wait group
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Apr 27 14:55:36 UTC 2023 - 1.7K bytes - Viewed (0) -
src/runtime/os_solaris.go
gp := getg() var mp *m if gp != nil { mp = gp.m } if mp != nil && mp.libcallsp == 0 { mp.libcallg.set(gp) mp.libcallpc = getcallerpc() // sp must be the last, because once async cpu profiler finds // all three values to be non-zero, it will use them mp.libcallsp = getcallersp() } else { mp = nil // See comment in sys_darwin.go:libcCall } var libcall libcall
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 06 18:49:01 UTC 2023 - 6.6K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/git.go
"os/exec" "runtime" "slices" "sync" ) type gitHandler struct { once sync.Once gitPath string gitPathErr error } func (h *gitHandler) Available() bool { if runtime.GOOS == "plan9" { // The Git command is usually not the real Git on Plan 9. // See https://golang.org/issues/29640. return false } h.once.Do(func() { h.gitPath, h.gitPathErr = exec.LookPath("git") })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 19:46:23 UTC 2023 - 1.8K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/path_windows.go
package toolchain import ( "io/fs" "os" "path/filepath" "strings" "sync" "cmd/go/internal/gover" ) // pathExts is a cached PATHEXT list. var pathExts struct { once sync.Once list []string } func initPathExts() { var exts []string x := os.Getenv(`PATHEXT`) if x != "" { for _, e := range strings.Split(strings.ToLower(x), `;`) { if e == "" { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 31 15:15:19 UTC 2023 - 1.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/internal/lazyregexp/lazyre.go
) // Regexp is a wrapper around [regexp.Regexp], where the underlying regexp will be // compiled the first time it is needed. type Regexp struct { str string once sync.Once rx *regexp.Regexp } func (r *Regexp) re() *regexp.Regexp { r.once.Do(r.build) return r.rx } func (r *Regexp) build() { r.rx = regexp.MustCompile(r.str) r.str = "" } func (r *Regexp) FindSubmatch(s []byte) [][]byte {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jul 12 20:38:21 UTC 2023 - 1.8K bytes - Viewed (0) -
platforms/core-runtime/functional/src/main/java/org/gradle/internal/lazy/Lazy.java
* <li>{@link #locking()} would create a lazy wrapper which performs locking when calling the supplier: the supplier will only be called once. Reading is done without locking once initialized.</li> * </ul> * * @param <T> the type of the lazy value */ public interface Lazy<T> extends Supplier<T> { /** * Executes an operation on the lazily computed value *
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:22:02 UTC 2023 - 3.2K bytes - Viewed (0) -
src/mime/type.go
".pdf": "application/pdf", ".png": "image/png", ".svg": "image/svg+xml", ".wasm": "application/wasm", ".webp": "image/webp", ".xml": "text/xml; charset=utf-8", } var once sync.Once // guards initMime var testInitMime, osInitMime func() func initMime() { if fn := testInitMime; fn != nil { fn() } else { setMimeTypes(builtinTypesLower, builtinTypesLower) osInitMime() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go
configurationName string initObjectSelector sync.Once objectSelector labels.Selector objectSelectorErr error initNamespaceSelector sync.Once namespaceSelector labels.Selector namespaceSelectorErr error initClient sync.Once client *rest.RESTClient clientErr error compileMatcher sync.Once compiledMatcher matchconditions.Matcher }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 12.4K bytes - Viewed (0) -
internal/once/init.go
package once import ( "context" "sync" "sync/atomic" ) // Inspired from Golang sync.Once but it is only marked // initialized when the provided function returns nil. // Init represents the structure. type Init struct { done uint32 m sync.Mutex } // Do is similar to sync.Once.Do - makes one successful
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 09 04:20:31 UTC 2023 - 2.1K bytes - Viewed (0) -
pkg/test/util.go
"go.uber.org/atomic" ) // SetForTest sets a variable for the duration of a test, then resets it once the test is complete. func SetForTest[T any](t Failer, vv *T, v T) { old := *vv *vv = v t.Cleanup(func() { *vv = old }) } // SetEnvForTest sets an environment variable for the duration of a test, then resets it once the test is complete. func SetEnvForTest(t Failer, k, v string) { old, oldset := os.LookupEnv(k)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 05 01:20:59 UTC 2024 - 1.9K bytes - Viewed (0)