Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for missLocked (0.09 sec)

  1. src/sync/map.go

    		if !ok && read.amended {
    			e, ok = m.dirty[key]
    			// Regardless of whether the entry was present, record a miss: this key
    			// will take the slow path until the dirty map is promoted to the read
    			// map.
    			m.missLocked()
    		}
    		m.mu.Unlock()
    	}
    	if !ok {
    		return nil, false
    	}
    	return e.load()
    }
    
    func (e *entry) load() (value any, ok bool) {
    	p := e.p.Load()
    	if p == nil || p == expunged {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  2. src/sync/map_test.go

    			t.Fatalf("Range visited %v elements of %v-element Map", len(seen), mapSize)
    		}
    	}
    }
    
    func TestIssue40999(t *testing.T) {
    	var m sync.Map
    
    	// Since the miss-counting in missLocked (via Delete)
    	// compares the miss count with len(m.dirty),
    	// add an initial entry to bias len(m.dirty) above the miss count.
    	m.Store(nil, struct{}{})
    
    	var finalized uint32
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top