pantonshire 8a517d932c gracefully shut down the channel on drop instead of discarding events
Previously, if the debouncer's shutdown flag was set while there was
anything in its accumulator, the contents of the accumulator would never
be sent through the mpsc channel, effectively causing the events folded
into the accumulator to be lost. This patch modifies the shutdown
behaviour to send the contents of the accumulator through the channel
before stopping the debouncer and closing the channel.
2023-08-19 09:04:34 +01:00
2023-04-29 14:32:20 +01:00
2023-04-29 14:38:35 +01:00

treacle

A generic event debouncer for Rust, for grouping events which occur close together in time into a single event.

For example, you may have some templates which you want to reload whenever a template file changes. However, if many small changes are made to the template files in quick succession, it would be wasteful to reload the templates for every change; instead, a debouncer could be used to group the changes that occur at a similar time into a single change, so the templates are only reloaded once.

Usage

S
Description
Event debouncer
Readme
125 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 100%