- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for AddUint32 (0.05 sec)
-
internal/http/server.go
w.Header().Set(RetryAfter, "60") w.WriteHeader(http.StatusServiceUnavailable) w.Write([]byte(http.ErrServerClosed.Error())) return } atomic.AddInt32(&srv.requestCount, 1) defer atomic.AddInt32(&srv.requestCount, -1) // Handle request using passed handler. handler.ServeHTTP(w, r) }) srv.listenerMutex.Lock() srv.Handler = wrappedHandler srv.listener = listener
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
func (ps *PubSub[T, M]) Subscribe(mask M, subCh chan T, doneCh <-chan struct{}, filter func(entry T) bool) error { totalSubs := atomic.AddInt32(&ps.numSubscribers, 1) if ps.maxSubscribers > 0 && totalSubs > ps.maxSubscribers { atomic.AddInt32(&ps.numSubscribers, -1) return fmt.Errorf("the limit of `%d` subscribers is reached", ps.maxSubscribers) } ps.Lock() defer ps.Unlock()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
for i := 0; i < numIterations; i++ { if rwm.GetRLock(context.Background(), nil, id, source, Options{Timeout: time.Second}) { n := atomic.AddInt32(activity, 1) if n < 1 || n >= 10000 { panic(fmt.Sprintf("wlock(%d)\n", n)) } for i := 0; i < 100; i++ { } atomic.AddInt32(activity, -1) rwm.RUnlock(context.Background()) } } cdone <- true } // Borrowed from rwmutex_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
for i := 0; i < numIterations; i++ { if rwm.GetRLock(context.Background(), "", "", time.Second) { n := atomic.AddInt32(activity, 1) if n < 1 || n >= 10000 { panic(fmt.Sprintf("wlock(%d)\n", n)) } for i := 0; i < 100; i++ { } atomic.AddInt32(activity, -1) rwm.RUnlock() } } cdone <- true } // Borrowed from rwmutex_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
cmd/erasure-decode.go
case errors.Is(err, errFileNotFound): atomic.StoreInt32(&missingPartsHeal, 1) case errors.Is(err, errFileCorrupt): atomic.StoreInt32(&bitrotHeal, 1) case errors.Is(err, errDiskNotFound): atomic.AddInt32(&disksNotFound, 1) } // This will be communicated upstream. p.orgReaders[bufIdx] = nil if br, ok := p.readers[i].(io.Closer); ok { br.Close() } p.readers[i] = nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 9.5K bytes - Viewed (0)