Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 2,505 for ONCE (0.05 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. pkg/proxy/winkernel/hns_test.go

    	epIpAddressRemote = "192.168.2.3"
    	epPaAddress       = "10.0.0.3"
    	protocol          = 6
    	internalPort      = 80
    	externalPort      = 32440
    )
    
    func TestGetNetworkByName(t *testing.T) {
    	// TODO: remove skip once the test has been fixed.
    	t.Skip("Skipping failing test on Windows.")
    	hns := hns{hcn: newHcnImpl()}
    	Network := mustTestNetwork(t)
    
    	network, err := hns.getNetworkByName(Network.Name)
    	if err != nil {
    		t.Error(err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  7. subprojects/core-api/src/main/java/org/gradle/api/launcher/cli/WelcomeMessageDisplayMode.java

    /**
     * The possible strategies for displaying a welcome message on the command line.
     *
     * @since 7.5
     */
    @Incubating
    public enum WelcomeMessageDisplayMode {
        ONCE, // the default, show the welcome message once per Gradle version
        NEVER // suppress the welcome message
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 13 13:24:29 UTC 2022
    - 967 bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/testdata/pgo/devirtualize/devirt.go

    	// The call below must evaluate selectA() to determine the receiver to
    	// use. This should happen exactly once per iteration. Assert that is
    	// the case to ensure the IR manipulation does not result in over- or
    	// under-evaluation.
    	selectI := 0
    	selectA := func(gotI int) Adder {
    		if gotI != selectI {
    			panic(fmt.Sprintf("selectA not called once per iteration; got i %d want %d", gotI, selectI))
    		}
    		selectI++
    
    		if gotI%10 == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:57 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  9. architecture/build-state-model.md

    ### Build session state
    
    A "build session" represents a single invocation of Gradle, for example when you run `gradlew build`.
    A session runs the build one or more times.
    For example, when continuous build is enabled, the session may run the build many times, but when it is disabled, the session will run the build once only.
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 22 13:39:49 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/lazy/LazyTest.groovy

    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicInteger
    import java.util.function.Supplier
    
    class LazyTest extends Specification {
    
        def "#factoryName supplier code is executed once with use"() {
            def supplier = Mock(Supplier)
    
            when:
            def lazy = factory(supplier)
    
            then:
            0 * supplier._
    
            when:
            lazy.use {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 5.2K bytes
    - Viewed (0)
Back to top