- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 65 for WaitGroup (0.36 sec)
-
cni/pkg/nodeagent/server_test.go
// Custom "wait group with timeout" for waiting for fakeServer calls in a goroutine to finish type WaitGroup struct { count int32 done chan struct{} } func NewWaitGroup() *WaitGroup { return &WaitGroup{ done: make(chan struct{}), } } func NewWaitForNCalls(t *testing.T, n int32) (*WaitGroup, func()) { wg := &WaitGroup{ done: make(chan struct{}), } wg.Add(n) return wg, func() {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 7.8K bytes - Viewed (0) -
cmd/notification.go
func (sys *NotificationSys) StorageInfo(objLayer ObjectLayer, metrics bool) StorageInfo { var storageInfo StorageInfo replies := make([]StorageInfo, len(sys.peerClients)) var wg sync.WaitGroup for i, client := range sys.peerClients { if client == nil { continue } wg.Add(1) go func(client *peerRESTClient, idx int) { defer wg.Done()
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 12 18:13:36 GMT 2024 - 44.5K bytes - Viewed (0) -
cmd/erasure.go
// - Non-healing disks // - Healing disks (if inclHealing is true) func (er erasureObjects) getOnlineDisksWithHealingAndInfo(inclHealing bool) (newDisks []StorageAPI, newInfos []DiskInfo, healing int) { var wg sync.WaitGroup disks := er.getDisks() infos := make([]DiskInfo, len(disks)) r := rand.New(rand.NewSource(time.Now().UnixNano())) for _, i := range r.Perm(len(disks)) { i := i wg.Add(1) go func() {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 26 06:32:14 GMT 2024 - 16K bytes - Viewed (1) -
internal/ioutil/wait_pipe.go
return err } // WaitPipe implements wait-group backend io.Pipe to provide // synchronization between read() end with write() end. func WaitPipe() (*PipeReader, *PipeWriter) { r, w := io.Pipe() var wg sync.WaitGroup wg.Add(1) return &PipeReader{ PipeReader: r, wait: wg.Wait, }, &PipeWriter{ PipeWriter: w, done: wg.Done, }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 27 14:55:36 GMT 2023 - 1.7K bytes - Viewed (0) -
cmd/peer-s3-server.go
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Mar 08 19:08:18 GMT 2024 - 8.4K bytes - Viewed (0) -
cmd/bitrot-streaming.go
type streamingBitrotWriter struct { iow io.WriteCloser closeWithErr func(err error) error h hash.Hash shardSize int64 canClose *sync.WaitGroup } func (b *streamingBitrotWriter) Write(p []byte) (int, error) { if len(p) == 0 { return 0, nil } b.h.Reset() b.h.Write(p) hashBytes := b.h.Sum(nil) _, err := b.iow.Write(hashBytes)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Jan 31 02:11:45 GMT 2024 - 5.8K bytes - Viewed (0) -
cmd/erasure-sets.go
// and re-arranges the disks in proper position. func (s *erasureSets) connectDisks() { defer func() { s.lastConnectDisksOpTime = time.Now() }() var wg sync.WaitGroup diskMap := s.getDiskMap() for _, endpoint := range s.endpoints.Endpoints { cdisk := diskMap[endpoint] if cdisk != nil && cdisk.IsOnline() { if s.lastConnectDisksOpTime.IsZero() { continue }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Apr 15 08:25:46 GMT 2024 - 37.5K bytes - Viewed (5) -
cmd/perf-tests.go
func selfSpeedTest(ctx context.Context, opts speedTestOpts) (SpeedTestResult, error) { objAPI := newObjectLayerFn() if objAPI == nil { return SpeedTestResult{}, errServerNotInitialized } var wg sync.WaitGroup var errOnce sync.Once var retError string var totalBytesWritten uint64 var totalBytesRead uint64 objCountPerThread := make([]uint64, opts.concurrency)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Jan 28 18:04:17 GMT 2024 - 11.3K bytes - Viewed (0) -
internal/dsync/dsync_test.go
// TOTAL time.Sleep(2 * testDrwMutexAcquireTimeout) // fmt.Println("Unlocking dm1") dm1st.Unlock(context.Background()) }() expect += 2 * testDrwMutexAcquireTimeout var wg sync.WaitGroup wg.Add(2) go func() { defer wg.Done() dm2nd.Lock(id, source) // Release lock after 10 seconds go func() { time.Sleep(2 * testDrwMutexAcquireTimeout)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
src/bytes/reader_test.go
} } } func TestReaderAtConcurrent(t *testing.T) { // Test for the race detector, to verify ReadAt doesn't mutate // any state. r := NewReader([]byte("0123456789")) var wg sync.WaitGroup for i := 0; i < 5; i++ { wg.Add(1) go func(i int) { defer wg.Done() var buf [1]byte r.ReadAt(buf[:], int64(i)) }(i) } wg.Wait() }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0)