concurrency

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UrlMutexes = make(map[string]*mutexWithTime)

mutexes to queue mass simultaneous requests of same url

View Source
var UrlMutexesLock sync.Mutex

Functions

func CleanUrlMutexes

func CleanUrlMutexes(now time.Time)

cleans up the UrlMutexes map by removing mutexes that have not been accessed in the last minute.

func GetOrCreateUrlMutex

func GetOrCreateUrlMutex(url string) *mutexWithTime

creates or retrieves a mutex for a given URL from the urlMutexes map

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL