-
Notifications
You must be signed in to change notification settings - Fork 112
Conversation
This: * Makes it easy to send immediately if we wait too long and/or if we have enough to send. * Is significantly more efficient than the debounce library as it doesn't spin off a bunch of "after" timers. fixes #245
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is a lot simpler 👍
I would like to abstract it out into its own class (in the messagequeue package) so as to more easily write tests for it. I will make a PR so we can see how it looks.
Note that this is slightly different from #254 in that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
(we can continue discussing abstracting this in #256). |
feat: debounce wants manually This commit was moved from ipfs/go-bitswap@f4c9702
Unfortunately, this is one of those cases in go where abstractions hurt more than they help.
This:
fixes #245