Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 58 for mu (0.16 sec)

  1. cmd/perf-tests.go

    					}
    					uploadsCancel()
    					return
    				}
    				response := time.Since(t)
    				atomic.AddUint64(&totalBytesWritten, uint64(info.Size))
    				objCountPerThread[i]++
    				mu.Lock()
    				uploadTimes = append(uploadTimes, response)
    				mu.Unlock()
    			}
    		}(i)
    	}
    	wg.Wait()
    
    	// We already saw write failures, no need to proceed into read's
    	if retError != "" {
    		return SpeedTestResult{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  2. internal/lsync/lrwmutex_test.go

    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.Unlock()
    }
    
    // Borrowed from rwmutex_test.go
    func TestUnlockPanic2(t *testing.T) {
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.RLock()
    	mu.Unlock()
    }
    
    // Borrowed from rwmutex_test.go
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  3. internal/dsync/dsync_test.go

    	type PaddedMutex struct {
    		*DRWMutex
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		mu := PaddedMutex{NewDRWMutex(ds, "")}
    		for pb.Next() {
    			mu.Lock(id, source)
    			mu.Unlock(context.Background())
    		}
    	})
    }
    
    func benchmarkMutex(b *testing.B, slack, work bool) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	mu := NewDRWMutex(ds, "")
    	if slack {
    		b.SetParallelism(10)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  4. cmd/erasure-common.go

    				//   unformatted or simply not accessible for some reason.
    				//
    				// - Do not consume disks which are being healed
    				//
    				// - Future: skip busy disks
    				return
    			}
    
    			mu.Lock()
    			newDisks = append(newDisks, disks[i])
    			mu.Unlock()
    		}()
    	}
    	wg.Wait()
    	return newDisks
    }
    
    func (er erasureObjects) getOnlineLocalDisks() (newDisks []StorageAPI) {
    	disks := er.getOnlineDisks()
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. internal/s3select/json/reader.go

    // reads are running.
    type syncReadCloser struct {
    	rc io.ReadCloser
    	mu sync.Mutex
    }
    
    func (pr *syncReadCloser) Read(p []byte) (n int, err error) {
    	// This ensures that Close will block until Read has completed.
    	// This allows another goroutine to close the reader.
    	pr.mu.Lock()
    	defer pr.mu.Unlock()
    	if pr.rc == nil {
    		return 0, io.EOF
    	}
    	return pr.rc.Read(p)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 24 03:58:53 GMT 2022
    - 3K bytes
    - Viewed (0)
  6. cmd/bucket-lifecycle.go

    		return nil
    	}
    	workers := *w
    	return workers[h%uint64(len(workers))]
    }
    
    func (es *expiryState) ResizeWorkers(n int) {
    	// Lock to avoid multiple resizes to happen at the same time.
    	es.mu.Lock()
    	defer es.mu.Unlock()
    	var workers []chan expiryOp
    	if v := es.workers.Load(); v != nil {
    		// Copy to new array.
    		workers = append(workers, *v...)
    	}
    
    	if n == len(workers) || n < 1 {
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  7. misc/linkcheck/linkcheck.go

    	}
    	return
    }
    
    // url may contain a #fragment, and the fragment is then noted as needing to exist.
    func crawl(url string, sourceURL string) {
    	if strings.Contains(url, "/devel/release") {
    		return
    	}
    	mu.Lock()
    	defer mu.Unlock()
    	if u, frag, ok := strings.Cut(url, "#"); ok {
    		url = u
    		if frag != "" {
    			uf := urlFrag{url, frag}
    			neededFrags[uf] = append(neededFrags[uf], sourceURL)
    		}
    	}
    	if crawled[url] {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 06 15:53:04 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  8. tensorflow/c/c_api.cc

    void TF_DeleteGraph(TF_Graph* g) {
      if (g == nullptr) return;
      g->mu.lock();
      g->delete_requested = true;
      const bool del = g->sessions.empty();
      g->mu.unlock();
      if (del) delete g;
    }
    
    TF_Operation* TF_GraphOperationByName(TF_Graph* graph, const char* oper_name) {
      mutex_lock l(graph->mu);
      auto iter = graph->name_map.find(oper_name);
      if (iter == graph->name_map.end()) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  9. cmd/metacache-set.go

    	// Copy so we can mutate
    	resCh := resultsDone
    	var done bool
    	var mu sync.Mutex
    	resErr := io.EOF
    
    	go func() {
    		var results metaCacheEntriesSorted
    		var returned bool
    		for entry := range in {
    			if returned {
    				// past limit
    				continue
    			}
    			mu.Lock()
    			returned = done
    			mu.Unlock()
    			if returned {
    				resCh = nil
    				continue
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:59:08 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  10. cmd/batch-handlers.go

    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	ri.Object = info.Name
    	ri.countItem(info.Size, info.DeleteMarker, success)
    }
    
    func (ri *batchJobInfo) trackCurrentBucketBatch(bucket string, batch []ObjectInfo) {
    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	for i := range batch {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 55.2K bytes
    - Viewed (0)
Back to top