- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 103 for mutex (0.03 sec)
-
src/archive/zip/register.go
fw, ok := flateWriterPool.Get().(*flate.Writer) if ok { fw.Reset(w) } else { fw, _ = flate.NewWriter(w, 5) } return &pooledFlateWriter{fw: fw} } type pooledFlateWriter struct { mu sync.Mutex // guards Close and Write fw *flate.Writer } func (w *pooledFlateWriter) Write(p []byte) (n int, err error) { w.mu.Lock() defer w.mu.Unlock() if w.fw == nil { return 0, errors.New("Write after Close") }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
cmd/bucket-replication-stats.go
Cache map[string]*BucketReplicationStats mostRecentStats BucketStatsMap registry metrics.Registry sync.RWMutex // mutex for Cache mostRecentStatsMu sync.Mutex // mutex for mostRecentStats wlock sync.RWMutex // mutex for active workers movingAvgTicker *time.Ticker // Ticker for calculating moving averages wTimer *time.Ticker // ticker for calculating active workers
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 13.6K bytes - Viewed (0) -
internal/dsync/dsync_test.go
benchmarkMutex(b, true, true) } func BenchmarkMutexNoSpin(b *testing.B) { b.ResetTimer() b.ReportAllocs() // This benchmark models a situation where spinning in the mutex should be // non-profitable and allows to confirm that spinning does not do harm. // To achieve this we create excess of goroutines most of which do local work. // These goroutines yield during local work, so that switching from
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0) -
cmd/untar.go
prefixAll string } // disconnectReader will ensure that no reads can take place on // the upstream reader after close has been called. type disconnectReader struct { r io.Reader mu sync.Mutex } func (d *disconnectReader) Read(p []byte) (n int, err error) { d.mu.Lock() defer d.mu.Unlock() if d.r != nil { return d.r.Read(p) } return 0, errors.New("reader closed") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
cmd/lock-rest-server-common_test.go
t.Fatal(err) } if err = newTestConfig(globalMinioDefaultRegion, obj); err != nil { t.Fatalf("unable initialize config file, %s", err) } locker := &lockRESTServer{ ll: &localLocker{ mutex: sync.Mutex{}, lockMap: make(map[string][]lockRequesterInfo), }, } creds := globalActiveCred token, err := authenticateNode(creds.AccessKey, creds.SecretKey) if err != nil { t.Fatal(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/bucket/bandwidth/monitor.go
type bucketThrottle struct { *rate.Limiter NodeBandwidthPerSec int64 } // Monitor holds the state of the global bucket monitor type Monitor struct { tlock sync.RWMutex // mutex for bucket throttling mlock sync.RWMutex // mutex for bucket measurement bucketsThrottle map[BucketOptions]*bucketThrottle bucketsMeasurement map[BucketOptions]*bucketMeasurement // Buckets with objects in flight
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 6K bytes - Viewed (0) -
cmd/globals.go
// into an SSE-S3 request. If enabled a valid, non-empty KMS // configuration must be present. globalAutoEncryption bool // Is compression enabled? globalCompressConfigMu sync.Mutex globalCompressConfig compress.Config // Some standard object extensions which we strictly dis-allow for compression.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 16.2K bytes - Viewed (0) -
internal/dsync/locked_rand.go
package dsync import ( "math/rand" "sync" ) // lockedRandSource provides protected rand source, implements rand.Source interface. type lockedRandSource struct { lk sync.Mutex src rand.Source } // Int63 returns a non-negative pseudo-random 63-bit integer as an int64. func (r *lockedRandSource) Int63() (n int64) { r.lk.Lock() n = r.src.Int63() r.lk.Unlock() return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 18 15:39:59 UTC 2021 - 1.3K bytes - Viewed (0) -
internal/dsync/drwmutex.go
writeLocks []string // Array of nodes that granted a write lock readLocks []string // Array of array of nodes that granted reader locks rng *rand.Rand m sync.Mutex // Mutex to prevent multiple simultaneous locks from this node clnt *Dsync cancelRefresh context.CancelFunc refreshInterval time.Duration lockRetryMinInterval time.Duration }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
internal/config/lambda/target/lazyinit.go
import ( "sync" "sync/atomic" ) // Inspired from Golang sync.Once but it is only marked // initialized when the provided function returns nil. 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()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Mar 07 16:12:41 UTC 2023 - 1.3K bytes - Viewed (0)