8000 GitHub - jney/buu
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jney/buu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buu

buu

Debouncer

The debouncer is partly based on https://github.com/bep/debounce. context.Context was added in order to ensure passed function would be called even if the program is stopped

debouncer := NewDebouncer(context.Background(), 80*time.Millisecond)
debouncer.Add(myFunc)
debouncer.Add(myFunc)

the debouncer will run the last function on <-ctx.Done

Throttler

throttler := NewThrottler(context.Background(), 80*time.Millisecond)
throttler.Add(myFunc)
throttler.Add(myFunc)

the throttler will not run the queued functions on <-ctx.Done

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0