- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for LoadUint32 (0.16 sec)
-
internal/once/init.go
// call to the function. ie, it invokes the function // if it is not successful yet. func (l *Init) Do(f func() error) error { if atomic.LoadUint32(&l.done) == 0 { return l.do(f) } return nil } func (l *Init) do(f func() error) error { l.m.Lock() defer l.m.Unlock() if atomic.LoadUint32(&l.done) == 0 { if err := f(); err != nil { return err } // Mark as done only when f() is successful
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 09 04:20:31 UTC 2023 - 2.1K bytes - Viewed (0) -
internal/config/lambda/target/lazyinit.go
type lazyInit struct { done uint32 m sync.Mutex } func (l *lazyInit) Do(f func() error) error { if atomic.LoadUint32(&l.done) == 0 { return l.doSlow(f) } return nil } func (l *lazyInit) doSlow(f func() error) error { l.m.Lock() defer l.m.Unlock() if atomic.LoadUint32(&l.done) == 0 { if err := f(); err != nil { return err } // Mark as done only when f() is successful
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Mar 07 16:12:41 UTC 2023 - 1.3K bytes - Viewed (0) -
internal/s3select/simdj/reader.go
type safeCloser struct { closed uint32 r io.Reader } func (s *safeCloser) Read(p []byte) (n int, err error) { if atomic.LoadUint32(&s.closed) == 1 { return 0, io.EOF } n, err = s.r.Read(p) if atomic.LoadUint32(&s.closed) == 1 { return 0, io.EOF } return n, err } func (s *safeCloser) Close() error { atomic.CompareAndSwapUint32(&s.closed, 0, 1)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 30 17:02:22 UTC 2023 - 4.9K bytes - Viewed (0) -
internal/http/server.go
// * return 503 (service unavailable) if the server in shutdown. wrappedHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // If server is in shutdown. if atomic.LoadUint32(&srv.inShutdown) != 0 { // To indicate disable keep-alive, server is shutting down. w.Header().Set("Connection", "close") // Add 1 minute retry header, incase-client wants to honor it
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 18:42:47 UTC 2024 - 6.1K bytes - Viewed (0) -
internal/pubsub/pubsub.go
types := Mask(atomic.LoadUint64(&ps.types)) if !types.Overlaps(Mask(mask.Mask())) { return 0 } return atomic.LoadInt32(&ps.numSubscribers) } // Subscribers returns the number of current subscribers for all types. func (ps *PubSub[T, M]) Subscribers() int32 { return atomic.LoadInt32(&ps.numSubscribers) } // New inits a PubSub system with a limit of maximum // subscribers unless zero is specified
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
cmd/mrf.go
func (m *mrfState) addPartialOp(op PartialOperation) { if m == nil { return } if atomic.LoadInt32(&m.closed) == 1 { return } m.wg.Add(1) defer m.wg.Done() if atomic.LoadInt32(&m.closing) == 1 { return } select { case m.opCh <- op: default: } } // Do not accept new MRF operations anymore and start to save
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:26:05 UTC 2024 - 6.5K bytes - Viewed (0)