Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 85 for Loadint32 (0.14 sec)

  1. pkg/volume/metrics_cached.go

    // error
    type cacheOnce struct {
    	m    sync.Mutex
    	done uint32
    }
    
    // Copied from sync.Once but we don't want to cache the results if there is an
    // error
    func (o *cacheOnce) cache(f func() error) {
    	if atomic.LoadUint32(&o.done) == 1 {
    		return
    	}
    	// Slow-path.
    	o.m.Lock()
    	defer o.m.Unlock()
    	if o.done == 0 {
    		err := f()
    		if err == nil {
    			atomic.StoreUint32(&o.done, 1)
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 11:12:06 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  2. pkg/lazy/lazy.go

    // non-nil error is returned.
    func NewWithRetry[T any](f func() (T, error)) Lazy[T] {
    	return &lazyImpl[T]{getter: f, retry: true}
    }
    
    func (l *lazyImpl[T]) Get() (T, error) {
    	if atomic.LoadUint32(&l.done) == 0 {
    		// Outlined slow-path to allow inlining of the fast-path.
    		return l.doSlow()
    	}
    	return l.res, l.err
    }
    
    func (l *lazyImpl[T]) doSlow() (T, error) {
    	l.m.Lock()
    	defer l.m.Unlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 17 22:54:10 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  3. internal/grid/connection.go

    	if debugPrint {
    		fmt.Println(c.Local, "->", c.Remote, "WaitForConnect")
    		defer fmt.Println(c.Local, "->", c.Remote, "WaitForConnect done")
    	}
    	c.connChange.L.Lock()
    	if atomic.LoadUint32((*uint32)(&c.state)) == StateConnected {
    		c.connChange.L.Unlock()
    		// Happy path.
    		return nil
    	}
    	ctx, cancel := context.WithCancel(ctx)
    	defer cancel()
    	changed := make(chan State, 1)
    	go func() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  4. pkg/test/echo/server/instance.go

    		Dialer:        s.Dialer,
    		ListenerIP:    listenerIP,
    		DisableALPN:   s.DisableALPN,
    		IstioVersion:  s.IstioVersion,
    	})
    }
    
    func (s *Instance) isReady() bool {
    	return atomic.LoadUint32(&s.ready) == 1
    }
    
    func (s *Instance) waitUntilReady() error {
    	wg := &sync.WaitGroup{}
    
    	onEndpointReady := func() {
    		wg.Done()
    	}
    
    	// Start the servers, updating port numbers as necessary.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 09 07:54:01 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  5. src/internal/poll/fd_wasip1.go

    	// syscall.Filetype is a uint8 but we store it as a uint32 in SysFile in
    	// order to use atomic load/store on the field, which is why we have to
    	// perform this type conversion.
    	fileType := syscall.Filetype(atomic.LoadUint32(&fd.Filetype))
    
    	if fileType == syscall.FILETYPE_UNKNOWN {
    		var stat syscall.Stat_t
    		if err := fd.Fstat(&stat); err != nil {
    			return 0, err
    		}
    		fileType = stat.Filetype
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 20:14:02 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/mod/sumdb/client.go

    // SetTileHeight can be called at most once,
    // and if so it must be called before the first call to Lookup.
    func (c *Client) SetTileHeight(height int) {
    	if atomic.LoadUint32(&c.didLookup) != 0 {
    		panic("SetTileHeight used after Lookup")
    	}
    	if height <= 0 {
    		panic("invalid call to SetTileHeight")
    	}
    	if c.tileHeight != 0 {
    		panic("multiple calls to SetTileHeight")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 17:50:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  7. src/sync/map_test.go

    	m.Store(nil, struct{}{})
    
    	var finalized uint32
    
    	// Set finalizers that count for collected keys. A non-zero count
    	// indicates that keys have not been leaked.
    	for atomic.LoadUint32(&finalized) == 0 {
    		p := new(int)
    		runtime.SetFinalizer(p, func(*int) {
    			atomic.AddUint32(&finalized, 1)
    		})
    		m.Store(p, struct{}{})
    		m.Delete(p)
    		runtime.GC()
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  8. src/runtime/gc_test.go

    	// Keep GC running continuously during the benchmark, which in
    	// turn keeps the write barrier on continuously.
    	var stop uint32
    	done := make(chan bool)
    	go func() {
    		for atomic.LoadUint32(&stop) == 0 {
    			runtime.GC()
    		}
    		close(done)
    	}()
    	defer func() {
    		atomic.StoreUint32(&stop, 1)
    		<-done
    	}()
    
    	b.ResetTimer()
    	f()
    	b.StopTimer()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"CompareAndSwapUint64", Func, 0},
    		{"CompareAndSwapUintptr", Func, 0},
    		{"Int32", Type, 19},
    		{"Int64", Type, 19},
    		{"LoadInt32", Func, 0},
    		{"LoadInt64", Func, 0},
    		{"LoadPointer", Func, 0},
    		{"LoadUint32", Func, 0},
    		{"LoadUint64", Func, 0},
    		{"LoadUintptr", Func, 0},
    		{"Pointer", Type, 19},
    		{"StoreInt32", Func, 0},
    		{"StoreInt64", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/named.go

    		n.loader = nil
    	}
    
    	n.setState(complete)
    	return n
    }
    
    // state atomically accesses the current state of the receiver.
    func (n *Named) state() namedState {
    	return namedState(atomic.LoadUint32(&n.state_))
    }
    
    // setState atomically stores the given state for n.
    // Must only be called while holding n.mu.
    func (n *Named) setState(state namedState) {
    	atomic.StoreUint32(&n.state_, uint32(state))
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 23.9K bytes
    - Viewed (0)
Back to top