You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It provides Chan function to wrap channel with debounce. On top of it there is now implemented Debouncer helper, that will wrap chan func() and execute functions from it. It should be closed with Close method.
Fixed a bug, when subsequent call of debounced will overwrite stored function pointer and previous call, that breaches call limiit will call different function. See ExampleWithMaxCalls in example_test.go.
When calls or wait limit is reached, debounced function was called on current goroutine. It is not intended to be so, because every other call will not block and just reschedule timer that calls function in separate goroutine.