Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for hook1 (0.04 sec)

  1. src/internal/runtime/exithook/hooks.go

    	runGoid atomic.Uint64
    	hooks   []Hook
    	running bool
    
    	// runtime sets these for us
    	Gosched func()
    	Goid    func() uint64
    	Throw   func(string)
    )
    
    // Add adds a new exit hook.
    func Add(h Hook) {
    	for !locked.CompareAndSwap(0, 1) {
    		Gosched()
    	}
    	hooks = append(hooks, h)
    	locked.Store(0)
    }
    
    // Run runs the exit hooks.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. src/internal/coverage/cfile/hooks.go

    // being tested, hence we do want to run exit hooks when the program
    // terminates.
    func InitHook(istest bool) {
    	// Note: hooks are run in reverse registration order, so
    	// register the counter data hook before the meta-data hook
    	// (in the case where two hooks are needed).
    	exithook.Add(exithook.Hook{F: emitCounterData, RunOnFailure: true})
    	if istest {
    		exithook.Add(exithook.Hook{F: emitMetaData, RunOnFailure: true})
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 02:32:19 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go

    		objectInterfaces: o,
    	}
    	for i, hook := range hooks {
    		attrForCheck := attr
    		if v.versionedAttr != nil {
    			attrForCheck = v.versionedAttr
    		}
    
    		invocation, statusErr := a.plugin.ShouldCallHook(ctx, hook, attrForCheck, o, v)
    		if statusErr != nil {
    			return statusErr
    		}
    		if invocation == nil {
    			continue
    		}
    
    		hook, ok := invocation.Webhook.GetMutatingWebhook()
    		if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/MoreExecutors.java

                        // following code, but unfortunately the behavior of logging
                        // is undefined in shutdown hooks.
                        // This is because the logging code installs a shutdown hook of its
                        // own. See Cleaner class inside {@link LogManager}.
                        service.shutdown();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 43.7K bytes
    - Viewed (0)
  5. src/runtime/testdata/testexithooks/testexithooks.go

    	f3 := func() { println("blek") }
    	f4 := func() { println("blub") }
    	f5 := func() { println("blat") }
    	exithook.Add(exithook.Hook{F: f1})
    	exithook.Add(exithook.Hook{F: f2, RunOnFailure: true})
    	exithook.Add(exithook.Hook{F: f3})
    	exithook.Add(exithook.Hook{F: f4, RunOnFailure: true})
    	exithook.Add(exithook.Hook{F: f5})
    	os.Exit(1)
    }
    
    func testPanics() {
    	f1 := func() { println("ok") }
    	f2 := func() { panic("BADBADBAD") }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/session/KtAnalysisSessionProvider.kt

        /**
         * [afterLeavingAnalysis] hooks into analysis *after* [analyze]'s action has been executed.
         *
         * The signature of [afterLeavingAnalysis] should be kept stable to avoid breaking binary compatibility, since [analyze] is inlined.
         */
        @KaAnalysisApiInternals
        public abstract fun afterLeavingAnalysis(session: KaSession, useSiteElement: KtElement)
    
        /**
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Mon May 27 17:22:24 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

                        // following code, but unfortunately the behavior of logging
                        // is undefined in shutdown hooks.
                        // This is because the logging code installs a shutdown hook of its
                        // own. See Cleaner class inside {@link LogManager}.
                        service.shutdown();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 15 10:40:05 UTC 2024
    - 39K bytes
    - Viewed (0)
  8. pkg/kubelet/kuberuntime/kuberuntime_container.go

    	}
    	return cStatus
    }
    
    // executePreStopHook runs the pre-stop lifecycle hooks if applicable and returns the duration it takes.
    func (m *kubeGenericRuntimeManager) executePreStopHook(ctx context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, containerSpec *v1.Container, gracePeriod int64) int64 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 54.7K bytes
    - Viewed (0)
  9. src/net/resolverdialfunc_test.go

    			},
    			Question: func(h dnsmessage.Header, q dnsmessage.Question) {
    				t.Logf("Header: %+v for %q (type=%v, class=%v)", h,
    					q.Name.String(), q.Type, q.Class)
    			},
    			// TODO: add test without HandleA* hooks specified at all, that Go
    			// doesn't issue retries; map to something terminal.
    			HandleA: func(w AWriter, name string) error {
    				w.AddIP([4]byte{1, 2, 3, 4})
    				w.AddIP([4]byte{5, 6, 7, 8})
    				return nil
    			},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/config.go

    	}
    	c.PostStartHooks[name] = PostStartHookConfigEntry{hook: hook, originatingStack: string(debug.Stack())}
    
    	return nil
    }
    
    // AddPostStartHookOrDie allows you to add a PostStartHook, but dies on failure.
    func (c *Config) AddPostStartHookOrDie(name string, hook PostStartHookFunc) {
    	if err := c.AddPostStartHook(name, hook); err != nil {
    		klog.Fatalf("Error registering PostStartHook %q: %v", name, err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 47.7K bytes
    - Viewed (0)
Back to top