- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 1,402 for finalizer (0.14 sec)
-
test/fixedbugs/issue27518b.go
runtime.GC() if shouldFinalize != finalized { err = "heap object finalized at the wrong time" } } func main() { var s StackObj s.h = new(HeapObj) s.h.init() runtime.SetFinalizer(s.h, func(h *HeapObj) { finalized = true }) gc(false) h := g(&s) gc(false) h.check() gc(true) // finalize here, after return value's last use. (Go1.11 never runs the finalizer.) if err != "" { panic(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 03 19:54:23 UTC 2018 - 1.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go
now := metav1.Now() existingCRD.DeletionTimestamp = &now } if !apiextensions.CRDHasFinalizer(existingCRD, apiextensions.CustomResourceCleanupFinalizer) { existingCRD.Finalizers = append(existingCRD.Finalizers, apiextensions.CustomResourceCleanupFinalizer) } // update the status condition too apiextensions.SetCRDCondition(existingCRD, apiextensions.CustomResourceDefinitionCondition{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:19 UTC 2022 - 8K bytes - Viewed (0) -
test/stackobj.go
import ( "fmt" "runtime" ) type HeapObj [8]int64 type StkObj struct { h *HeapObj } var n int var c int = -1 func gc() { // encourage heap object to be collected, and have its finalizer run. runtime.GC() runtime.GC() runtime.GC() n++ } func main() { f() gc() // prior to stack objects, heap object is not collected until here if c < 0 { panic("heap object never collected")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 03 19:54:16 UTC 2018 - 975 bytes - Viewed (0) -
src/os/file_unix.go
// Fd returns the integer Unix file descriptor referencing the open file. // If f is closed, the file descriptor becomes invalid. // If f is garbage collected, a finalizer may close the file descriptor, // making it invalid; see [runtime.SetFinalizer] for more information on when // a finalizer might be run. On Unix systems this will cause the [File.SetDeadline] // methods to stop working.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:52:34 UTC 2024 - 14.9K bytes - Viewed (0) -
src/go/parser/testdata/chans.go2
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 24 19:44:06 UTC 2020 - 1.7K bytes - Viewed (0) -
src/cmd/go/internal/base/limit.go
} runtime.SetFinalizer(checker, nil) }, nil } var ( netLimitOnce sync.Once netLimitSem chan struct{} ) type netTokenChecker struct { released bool // We want to use a finalizer to check that all acquired tokens are returned, // so we arbitrarily pad the tokens with a string to defeat the runtime's // “tiny allocator”. unusedAvoidTinyAllocator string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 19 02:47:12 UTC 2023 - 1.9K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testdata/chans.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 1.8K bytes - Viewed (0) -
src/runtime/pinner.go
p.pinner = new(pinner) p.refs = p.refStore[:0] // We set this finalizer once and never clear it. Thus, if the // pinner gets cached, we'll reuse it, along with its finalizer. // This lets us avoid the relatively expensive SetFinalizer call // when reusing from the cache. The finalizer however has to be // resilient to an empty pinner being finalized, which is done // by checking p.refs' length.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 11K bytes - Viewed (0) -
test/stackobj3.go
import ( "runtime" ) type HeapObj [8]int64 type StkObj struct { h *HeapObj } var n int var c int = -1 func gc() { // encourage heap object to be collected, and have its finalizer run. runtime.GC() runtime.GC() runtime.GC() n++ } var null StkObj var sink *HeapObj //go:noinline func use(p *StkObj) { } //go:noinline func f(s StkObj, b bool) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 03 19:54:16 UTC 2018 - 1.4K bytes - Viewed (0) -
pkg/controller/job/metrics/metrics.go
"FailJob", "Ignore" and "Count".`, }, []string{"action"}) // TerminatedPodsTrackingFinalizerTotal records the addition and removal of // terminated pods that have the finalizer batch.kubernetes.io/job-tracking, // regardless of whether they are owned by a Job. TerminatedPodsTrackingFinalizerTotal = metrics.NewCounterVec( &metrics.CounterOpts{ Subsystem: JobControllerSubsystem,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 05 17:25:15 UTC 2024 - 8.3K bytes - Viewed (0)