Skip to content

Cancellable throttling and debouncing #181

Description

@CorvusPrudens

For signals and possibly functions that are throttled or debounced, it would be very useful to allow some form of cancellation.

As an example, consider a throttled search query; if the user is typing in an input element and then hits enter, what should happen? I think the natural expectation is that the query executes immediately. As they exist now, these deferred signals and functions can't easily provide this functionality.

I'm not sure cancel fully captures my thinking, here. There are really two distinct ideas:

  1. Cancel any throttled or debounced action without setting any signals or calling functions.
  2. Call the function or update the signal immediately and cancel any awaiting changes.

I'm not sure if one or both of these is important enough to be included by default, but at the very least it would be awesome to have a set of throttled/debounced functions/signals that can be cancelled!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions