Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetFinalizer (0.09 sec)

  1. cni/pkg/nodeagent/pod_cache.go

    	defer p.mu.Unlock()
    	if _, ok := p.currentPodCache[uid]; !ok {
    		p.currentPodCache[uid] = WorkloadInfo{}
    	}
    }
    
    func (p *podNetnsCache) addToCacheUnderLock(uid string, workload WorkloadInfo) {
    	runtime.SetFinalizer(workload.Netns, closeNetns)
    	p.currentPodCache[uid] = workload
    }
    
    func closeNetns(netns NetnsCloser) {
    	netns.Close()
    }
    
    func (p *podNetnsCache) ReadCurrentPodSnapshot() map[string]WorkloadInfo {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri May 31 17:18:11 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. istioctl/pkg/analyze/analyze.go

    		}
    	}
    	return readers, nil
    }
    
    func gatherFile(f string) (local.ReaderSource, error) {
    	r, err := os.Open(f)
    	if err != nil {
    		return local.ReaderSource{}, err
    	}
    	runtime.SetFinalizer(r, func(x *os.File) {
    		err = x.Close()
    		if err != nil {
    			log.Infof("file : %s is not closed: %v", f, err)
    		}
    	})
    	return local.ReaderSource{Name: f, Reader: r}, nil
    }
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 31 06:53:50 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  3. doc/go_mem.html

    </p>
    
    <h3 id="finalizer">Finalizers</h3>
    
    <p>
    The <a href="/pkg/runtime/"><code>runtime</code></a> package provides
    a <code>SetFinalizer</code> function that adds a finalizer to be called when
    a particular object is no longer reachable by the program.
    A call to <code>SetFinalizer(x, f)</code> is synchronized before the finalization call <code>f(x)</code>.
    </p>
    
    <h3 id="more">Additional Mechanisms</h3>
    
    <p>
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Mar 04 15:54:42 UTC 2024
    - 26.6K bytes
    - Viewed (0)
Back to top