Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CompareAndSwapInt64 (0.18 sec)

  1. tests/prepared_stmt_test.go

    	}(user.ID)
    
    	wg.Add(1)
    	go func() {
    		defer wg.Done()
    		for range closeValid {
    			for i := 0; i < loopCount; i++ {
    				pdb.Close() // the Close method must can be call multiple times
    				atomic.CompareAndSwapInt64(&closeFinishedAt, 0, time.Now().UnixNano())
    			}
    		}
    	}()
    
    	wg.Wait()
    	var tmp User
    	err = tx.Session(&gorm.Session{}).First(&tmp, user.ID).Error
    	if err != gorm.ErrInvalidDB {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:02:05 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. cmd/xl-storage-disk-id-check.go

    		atomic.StoreInt64(&e.cachedSec, t)
    	})
    	acc := e.cached.Load()
    	if lastT := atomic.LoadInt64(&e.cachedSec); lastT != t {
    		// Check if lastT was changed by someone else.
    		if atomic.CompareAndSwapInt64(&e.cachedSec, lastT, t) {
    			// Now we swap in a new.
    			newAcc := &AccElem{}
    			old := e.cached.Swap(newAcc)
    			var a AccElem
    			a.Size = atomic.LoadInt64(&old.Size)
    			a.Total = atomic.LoadInt64(&old.Total)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:56:26 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top