Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for StoreInt64 (0.34 sec)

  1. cmd/dynamic-timeouts.go

    			// Make copy on stack in order to call adjust()
    			logCopy := [dynamicTimeoutLogSize]time.Duration{}
    			copy(logCopy[:], dt.log[:])
    
    			// reset log entries
    			atomic.StoreInt64(&dt.entries, 0)
    			dt.mutex.Unlock()
    
    			dt.adjust(logCopy)
    			return
    		}
    		dt.mutex.Unlock()
    	}
    }
    
    // adjust changes the value of the dynamic timeout based on the
    // previous results
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  2. internal/rest/rpc-stats.go

    	var dialStart, dialEnd int64
    
    	trace := &httptrace.ClientTrace{
    		ConnectStart: func(network, addr string) {
    			atomic.StoreInt64(&dialStart, time.Now().UnixNano())
    		},
    		ConnectDone: func(network, addr string, err error) {
    			if err == nil {
    				atomic.StoreInt64(&dialEnd, time.Now().UnixNano())
    			}
    		},
    	}
    
    	return req.WithContext(httptrace.WithClientTrace(req.Context(), trace)), func() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Sep 29 16:27:58 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  3. internal/grid/muxclient.go

    		}
    	}()
    	var pingTimer <-chan time.Time
    	if m.deadline == 0 || m.deadline > clientPingInterval {
    		ticker := time.NewTicker(clientPingInterval)
    		defer ticker.Stop()
    		pingTimer = ticker.C
    		atomic.StoreInt64(&m.LastPong, time.Now().Unix())
    	}
    	defer m.parent.deleteMux(false, m.MuxID)
    	for {
    		select {
    		case <-m.ctx.Done():
    			if debugPrint {
    				fmt.Println("Client sending disconnect to mux", m.MuxID)
    			}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  4. cmd/xl-storage-disk-id-check.go

    func (e *lockedLastMinuteLatency) addSize(value time.Duration, sz int64) {
    	// alloc on every call, so we have a clean entry to swap in.
    	t := time.Now().Unix()
    	e.init.Do(func() {
    		e.cached.Store(&AccElem{})
    		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) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  5. internal/grid/muxserver.go

    		return pongMsg{Err: &msg}
    	}
    	select {
    	case <-m.ctx.Done():
    		err := context.Cause(m.ctx).Error()
    		return pongMsg{Err: &err}
    	default:
    		atomic.StoreInt64(&m.LastPing, time.Now().Unix())
    		return pongMsg{}
    	}
    }
    
    func (m *muxServer) disconnect(msg string) {
    	if debugPrint {
    		fmt.Println("Mux", m.ID, "disconnecting. Reason:", msg)
    	}
    	if msg != "" {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  6. internal/rest/client.go

    						now := time.Now()
    						disconnected := now.Sub(c.LastConn())
    						logger.Event(context.Background(), "Client '%s' re-connected in %s", c.url.String(), disconnected)
    						atomic.StoreInt64(&c.lastConn, now.UnixNano())
    					}
    					return
    				}
    				attempt++
    				time.Sleep(backOff(attempt))
    			}
    		}()
    		return true
    	}
    	return false
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  7. internal/grid/connection.go

    	gotState := atomic.LoadUint32((*uint32)(&c.state))
    	if gotState == StateShutdown || State(gotState) == s {
    		return
    	}
    	if s == StateConnected {
    		atomic.StoreInt64(&c.LastPong, time.Now().UnixNano())
    	}
    	atomic.StoreUint32((*uint32)(&c.state), uint32(s))
    	if debugPrint {
    		fmt.Println(c.Local, "updateState:", gotState, "->", s)
    	}
    	c.connChange.Broadcast()
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  8. internal/dsync/dsync-server_test.go

    func (l *lockServer) setRefreshReply(refreshed bool) {
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	l.lockNotFound = !refreshed
    }
    
    func (l *lockServer) setResponseDelay(responseDelay time.Duration) {
    	atomic.StoreInt64(&l.responseDelay, int64(responseDelay))
    }
    
    func (l *lockServer) Lock(args *LockArgs) (reply bool, err error) {
    	if d := atomic.LoadInt64(&l.responseDelay); d != 0 {
    		time.Sleep(time.Duration(d))
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg sync/atomic, func LoadUint32(*uint32) uint32
    pkg sync/atomic, func LoadUint64(*uint64) uint64
    pkg sync/atomic, func LoadUintptr(*uintptr) uintptr
    pkg sync/atomic, func StoreInt32(*int32, int32)
    pkg sync/atomic, func StoreInt64(*int64, int64)
    pkg sync/atomic, func StorePointer(*unsafe.Pointer, unsafe.Pointer)
    pkg sync/atomic, func StoreUint32(*uint32, uint32)
    pkg sync/atomic, func StoreUint64(*uint64, uint64)
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top