Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for backoffWait (0.16 sec)

  1. internal/dsync/utils.go

    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package dsync
    
    import (
    	"math/rand"
    	"time"
    )
    
    func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat May 13 15:42:21 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  2. internal/dsync/drwmutex.go

    		v, err := strconv.Atoi(lri)
    		if err != nil {
    			panic(err)
    		}
    		lockRetryMinInterval = time.Duration(v) * time.Millisecond
    	}
    
    	lockRetryBackOff = backoffWait(
    		lockRetryMinInterval,
    		100*time.Millisecond,
    		5*time.Second,
    	)
    }
    
    func log(format string, data ...interface{}) {
    	if dsyncLog {
    		console.Printf(format, data...)
    	}
    }
    
    const (
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
Back to top