- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for popHead (3.8 sec)
-
src/sync/export_test.go
} func (d *poolDequeue) PopHead() (any, bool) { return d.popHead() } func (d *poolDequeue) PopTail() (any, bool) { return d.popTail() } func NewPoolChain() PoolDequeue { return new(poolChain) } func (c *poolChain) PushHead(val any) bool { c.pushHead(val) return true } func (c *poolChain) PopHead() (any, bool) { return c.popHead() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 16:39:52 UTC 2023 - 1.2K bytes - Viewed (0) -
src/sync/poolqueue.go
// and acts as a store barrier for writing the slot. d.headTail.Add(1 << dequeueBits) return true } // popHead removes and returns the element at the head of the queue. // It returns false if the queue is empty. It must only be called by a // single producer. func (d *poolDequeue) popHead() (any, bool) { var slot *eface for { ptrs := d.headTail.Load() head, tail := d.unpack(ptrs) if tail == head {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 18:12:29 UTC 2024 - 8.3K bytes - Viewed (0) -
src/sync/pool_test.go
} } // Check that at least some PopHeads succeeded. We skip this // check in short mode because it's common enough that the // queue will stay nearly empty all the time and a PopTail // will happen during the window between every PushHead and // PopHead. if !testing.Short() && nPopHead == 0 { t.Errorf("popHead never succeeded") } } func TestNilPool(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8K bytes - Viewed (0) -
src/sync/pool.go
New func() any } // Local per-P Pool appendix. type poolLocalInternal struct { private any // Can be used only by the respective P. shared poolChain // Local P can pushHead/popHead; any P can popTail. } type poolLocal struct { poolLocalInternal // Prevents false sharing on widespread platforms with // 128 mod (cache line size) = 0 .
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 9.4K bytes - Viewed (1) -
pkg/queue/delay_test.go
heap.Push(pq, task) } // dequeue should be in order for i, task := range sorted { peeked := pq.Peek() popped := heap.Pop(pq) if task != popped { t.Fatalf("pop %d was not in order", i) } if peeked != popped { t.Fatalf("did not peek at the next item to be popped") } } } func TestDelayQueueOrdering(t *testing.T) { dq := NewDelayed(DelayQueueWorkers(2)) stop := make(chan struct{})
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jul 20 06:27:31 UTC 2023 - 4.3K bytes - Viewed (0) -
platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/impl/FileSystemSnapshotSerializer.java
} public List<FileSystemLocationSnapshot> pop() { List<FileSystemLocationSnapshot> popped = stack.pollLast(); if (popped == null) { throw new IllegalStateException("Stack empty"); } return popped; } } private static String toAbsolutePath(Collection<String> parents, String fileName) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Jan 26 15:45:55 UTC 2024 - 9.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go
// source can change over time - i.e. for watchCache circular // buffer. When the circular buffer is full and an event needs // to be popped off, watchCache::startIndex is incremented. In // this case, an interval tracking that popped event is valid // only if it has already been copied to its internal buffer. // However, for efficiency we perform that lazily and we mark
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 8.2K bytes - Viewed (0) -
subprojects/core/src/test/groovy/org/gradle/internal/classpath/DefaultInstrumentedGroovyCallsTrackerTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Jul 24 15:57:59 UTC 2023 - 4.8K bytes - Viewed (0) -
pkg/scheduler/internal/heap/heap_test.go
// Retrieve head without removing it head := h.Peek() if e, a := i, head.(testHeapObject).val; a != e { t.Errorf("expected %d, got %d", e, a) } } // Make sure that the numbers are popped in ascending order. prevNum := 0 for i := 0; i < amount; i++ { obj, err := h.Pop() num := obj.(testHeapObject).val.(int) // All the items must be sorted. if err != nil || prevNum > num {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 05 02:24:38 UTC 2023 - 7.9K bytes - Viewed (0) -
src/go/ast/commentmap.go
s.pop(n.Pos()) *s = append((*s), n) } // pop pops all nodes that appear lexically before pos // (i.e., whose lexical extent has ended before or at pos). // It returns the last node popped. func (s *nodeStack) pop(pos token.Pos) (top Node) { i := len(*s) for i > 0 && (*s)[i-1].End() <= pos { top = (*s)[i-1] i-- } *s = (*s)[0:i] return top }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0)