- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 58 for WaitGroup (0.37 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() {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 18.7K 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() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
cmd/notification.go
func (sys *NotificationSys) StorageInfo(ctx context.Context, 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()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 46.2K bytes - Viewed (0) -
tests/prepared_stmt_test.go
tx, err := OpenTestConnection(&gorm.Config{}) AssertEqual(t, err, nil) sqlDB, _ := tx.DB() sqlDB.SetMaxOpenConns(1) tx = tx.Session(&gorm.Session{PrepareStmt: true}) wg := sync.WaitGroup{} for i := 0; i < 100; i++ { wg.Add(1) go func() { user := User{Name: "jinzhu"} tx.Create(&user) var result User tx.First(&result) wg.Done() }() } wg.Wait()
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
cmd/perf-tests.go
func selfSpeedTest(ctx context.Context, opts speedTestOpts) (res SpeedTestResult, err 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 11.8K bytes - Viewed (0) -
cmd/bitrot-streaming.go
type streamingBitrotWriter struct { iow io.WriteCloser closeWithErr func(err error) h hash.Hash shardSize int64 canClose *sync.WaitGroup byteBuf []byte } 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0) -
cmd/peer-s3-server.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 22 21:57:20 UTC 2024 - 8.1K bytes - Viewed (0) -
cmd/erasure-sets.go
// and re-arranges the disks in proper position. func (s *erasureSets) connectDisks(log bool) { 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 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 27 10:41:37 UTC 2024 - 37K bytes - Viewed (1) -
cni/pkg/nodeagent/netns_linux.go
// will force the runtime to scrap the current thread, that is maybe // not as optimal but at least always safe to do. runtime.UnlockOSThread() } }() return toRun() } var wg sync.WaitGroup wg.Add(1) // Start the callback in a new green thread so that if we later fail // to switch the namespace back to the original one, we can safely // leave the thread locked to die without a risk of the current thread
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jan 31 10:05:36 UTC 2024 - 2.7K bytes - Viewed (0)