Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 938 for rwmutex (0.37 sec)

  1. src/sync/map_reference_test.go

    	Clear()
    }
    
    var (
    	_ mapInterface = &RWMutexMap{}
    	_ mapInterface = &DeepCopyMap{}
    )
    
    // RWMutexMap is an implementation of mapInterface using a sync.RWMutex.
    type RWMutexMap struct {
    	mu    sync.RWMutex
    	dirty map[any]any
    }
    
    func (m *RWMutexMap) Load(key any) (value any, ok bool) {
    	m.mu.RLock()
    	value, ok = m.dirty[key]
    	m.mu.RUnlock()
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. src/net/internal/socktest/switch.go

    package socktest
    
    import (
    	"fmt"
    	"sync"
    )
    
    // A Switch represents a callpath point switch for socket system
    // calls.
    type Switch struct {
    	once sync.Once
    
    	fmu   sync.RWMutex
    	fltab map[FilterType]Filter
    
    	smu   sync.RWMutex
    	sotab Sockets
    	stats stats
    }
    
    func (sw *Switch) init() {
    	sw.fltab = make(map[FilterType]Filter)
    	sw.sotab = make(Sockets)
    	sw.stats = make(stats)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/apis/kubeadm/timeoututils.go

    		UpgradeManifests:                 &metav1.Duration{Duration: constants.UpgradeManifestsTimeout},
    	}
    }
    
    var (
    	activeTimeouts *Timeouts = nil
    	timeoutMutex             = &sync.RWMutex{}
    )
    
    func init() {
    	SetDefaultTimeouts(&activeTimeouts)
    }
    
    // GetActiveTimeouts gets the active timeouts structure.
    func GetActiveTimeouts() *Timeouts {
    	timeoutMutex.RLock()
    	defer timeoutMutex.RUnlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/waitgroup/waitgroup.go

    limitations under the License.
    */
    
    package waitgroup
    
    import (
    	"fmt"
    	"sync"
    )
    
    // SafeWaitGroup must not be copied after first use.
    type SafeWaitGroup struct {
    	wg sync.WaitGroup
    	mu sync.RWMutex
    	// wait indicate whether Wait is called, if true,
    	// then any Add with positive delta will return error.
    	wait bool
    }
    
    // Add adds delta, which may be negative, similar to sync.WaitGroup.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 11 03:04:14 UTC 2018
    - 1.5K bytes
    - Viewed (0)
  5. pilot/pkg/util/informermetric/informerutil.go

    )
    
    var (
    	clusterLabel = monitoring.CreateLabel("cluster")
    
    	errorMetric = monitoring.NewSum(
    		"controller_sync_errors_total",
    		"Total number of errorMetric syncing controllers.",
    	)
    
    	mu       sync.RWMutex
    	handlers = map[cluster.ID]cache.WatchErrorHandler{}
    )
    
    // ErrorHandlerForCluster fetches or creates an ErrorHandler that emits a metric
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. cmd/ilm-config.go

    	"github.com/minio/minio/internal/config/ilm"
    )
    
    var globalILMConfig = ilmConfig{
    	cfg: ilm.Config{
    		ExpirationWorkers: 100,
    		TransitionWorkers: 100,
    	},
    }
    
    type ilmConfig struct {
    	mu  sync.RWMutex
    	cfg ilm.Config
    }
    
    func (c *ilmConfig) getExpirationWorkers() int {
    	c.mu.RLock()
    	defer c.mu.RUnlock()
    
    	return c.cfg.ExpirationWorkers
    }
    
    func (c *ilmConfig) getTransitionWorkers() int {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 05 02:50:24 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  7. cmd/bootstrap-messages.go

    package cmd
    
    import (
    	"context"
    	"sync"
    
    	"github.com/minio/madmin-go/v3"
    	"github.com/minio/minio/internal/pubsub"
    )
    
    const bootstrapTraceLimit = 4 << 10
    
    type bootstrapTracer struct {
    	mu   sync.RWMutex
    	info []madmin.TraceInfo
    }
    
    var globalBootstrapTracer = &bootstrapTracer{}
    
    func (bs *bootstrapTracer) Record(info madmin.TraceInfo) {
    	bs.mu.Lock()
    	defer bs.mu.Unlock()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Aug 23 10:07:06 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/max_seats.go

    	SetMaxSeats(priorityLevelName string, maxSeats uint64)
    
    	// ForgetPriorityLevel removes max seats tracking for a priority level.
    	ForgetPriorityLevel(priorityLevelName string)
    }
    
    type maxSeatsTracker struct {
    	sync.RWMutex
    
    	maxSeats map[string]uint64
    }
    
    func NewMaxSeatsTracker() MaxSeatsTracker {
    	return &maxSeatsTracker{
    		maxSeats: make(map[string]uint64),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 17 19:26:52 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  9. pkg/monitoring/derived_gauge.go

    import (
    	"context"
    	"sync"
    
    	"go.opentelemetry.io/otel/attribute"
    	api "go.opentelemetry.io/otel/metric"
    
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/pkg/slices"
    )
    
    type derivedGauge struct {
    	mu    sync.RWMutex
    	attrs map[attribute.Set]func() float64
    
    	name string
    }
    
    var _ DerivedMetric = &derivedGauge{}
    
    func newDerivedGauge(name, description string) DerivedMetric {
    	dm := &derivedGauge{
    		name:  name,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  10. pilot/cmd/pilot-agent/status/grpcready/probe.go

    	"fmt"
    	"sync"
    
    	"istio.io/istio/pilot/cmd/pilot-agent/status/ready"
    	"istio.io/istio/pkg/file"
    	"istio.io/istio/pkg/istio-agent/grpcxds"
    )
    
    var _ ready.Prober = &probe{}
    
    type probe struct {
    	sync.RWMutex
    	bootstrapPath string
    	bootstrap     *grpcxds.Bootstrap
    }
    
    // NewProbe returns a probe that checks if a valid bootstrap file can be loaded once.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Oct 28 16:58:31 UTC 2021
    - 1.9K bytes
    - Viewed (0)
Back to top