Repository navigation
Conversation
|
Hmmm, seeing the random failing in CI jobs, this is probably a timing issue? And the Now to figure out if the test should be adjusted, or if there is actually an error in the implementation... |
|
I figured it out. It was the I think this fixes the leaking of threads and adds two styles of debouncing that are also pretty common. |
|
Windows nightly fails with: ... who's fault would this be? 🤔 EDIT: Ah... rerunning fixes it. That's dumb 🤷 |
ddb4081 to
a4ec84d
Compare
commit ddb4081 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 14:03:24 2024 +0100 add PR number and URL to Changelog commit ffecec5 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 14:02:58 2024 +0100 remove custom build directory commit 1eeceb4 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 13:06:49 2024 +0100 and fix the CI commit 27c6ff9 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:50:20 2024 +0100 upped version in cabal file commit 4246ff5 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:49:41 2024 +0100 documentation fix commit 16a20ca Merge: b9e7aad 23b8c4c Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:42:07 2024 +0100 Merge branch 'master' into trying-to-rework-Control-Debounce commit b9e7aad Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:26:54 2024 +0100 added to Changelog commit 73deb77 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:26:39 2024 +0100 auto-update/test: adjusted tests for new 'DebounceEdge' tests commit f0ba37b Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sun Oct 27 12:26:08 2024 +0100 auto-update: fixed debounce to not leak threads and also added two new 'DebounceEdge' types. Also improved (hopefully) the documentation commit a0f9e92 Author: Felix Paulusma <felix.paulusma@gmail.com> Date: Sat Jun 8 23:17:01 2024 +0200 auto-update: reworked 'mkDebounce', and it should work... but i'Leading' only works if I put a 'trace' in a specific spot???
b5cedbe to
f368fc4
Compare
|
Oh god, https://github.com/yesodweb/wai/actions/runs/11641886813/job/32420880212?pr=996 |
|
@Vlix Is this PR ready for reviewing? |
|
@kazu-yamamoto Yes, I hope with this last commit (and |
…on those GHC versions, and no longer supporting GHC 8.10.7. I think it's time to drop it; we're at GHC 9.12 almost
|
Apparently my new |
…n't test that. Did extend the test to verify a trigger does at least restart the timer
|
When this is merged, I'll update the CI in #1011 to include |
| -- ** Accessors | ||
| DI.debounceFreq, | ||
| DI.debounceAction, | ||
| DI.debounceEdge, |
There was a problem hiding this comment.
I wonder why DebounceEdge is NOT exported while deboundeEdge is exported.
There was a problem hiding this comment.
Never mind.
leadingEdge should be used instead of Leading.
|
Rebased and merged. |
## 0.2.6 * Using the thread version of AutoUpdate for non-threaded RTS. [#1020](yesodweb/wai#1020) ## 0.2.5 * Thread less autoupdate [#1018](yesodweb/wai#1018) ## 0.2.4 * Simple refactoring. ## 0.2.3 * [#996](yesodweb/wai#996): Refactored the `Control.Debounce` logic to not leak threads. * [#996](yesodweb/wai#996): Added extra `DebounceEdge` options for different types of debouncing. * `LeadingMute`: Action on first trigger, and ignore any triggers during cooldown * `TrailingDelay`: First trigger starts cooldown, and triggers during cooldown extend the cooldown. Action when cooldown expires. ## 0.2.2 * NewAPI: updateThreadName, reaperThreadName, debounceThreadName: Names can be given via this field to threads for GHC.Conc.Sync.listThreads. ## 0.2.1 * Labeling threads.
## 0.2.6 * Using the thread version of AutoUpdate for non-threaded RTS. [#1020](yesodweb/wai#1020) ## 0.2.5 * Thread less autoupdate [#1018](yesodweb/wai#1018) ## 0.2.4 * Simple refactoring. ## 0.2.3 * [#996](yesodweb/wai#996): Refactored the `Control.Debounce` logic to not leak threads. * [#996](yesodweb/wai#996): Added extra `DebounceEdge` options for different types of debouncing. * `LeadingMute`: Action on first trigger, and ignore any triggers during cooldown * `TrailingDelay`: First trigger starts cooldown, and triggers during cooldown extend the cooldown. Action when cooldown expires. ## 0.2.2 * NewAPI: updateThreadName, reaperThreadName, debounceThreadName: Names can be given via this field to threads for GHC.Conc.Sync.listThreads. ## 0.2.1 * Labeling threads.
## 0.2.6 * Using the thread version of AutoUpdate for non-threaded RTS. [#1020](yesodweb/wai#1020) ## 0.2.5 * Thread less autoupdate [#1018](yesodweb/wai#1018) ## 0.2.4 * Simple refactoring. ## 0.2.3 * [#996](yesodweb/wai#996): Refactored the `Control.Debounce` logic to not leak threads. * [#996](yesodweb/wai#996): Added extra `DebounceEdge` options for different types of debouncing. * `LeadingMute`: Action on first trigger, and ignore any triggers during cooldown * `TrailingDelay`: First trigger starts cooldown, and triggers during cooldown extend the cooldown. Action when cooldown expires. ## 0.2.2 * NewAPI: updateThreadName, reaperThreadName, debounceThreadName: Names can be given via this field to threads for GHC.Conc.Sync.listThreads. ## 0.2.1 * Labeling threads.
## 0.2.6 * Using the thread version of AutoUpdate for non-threaded RTS. [#1020](yesodweb/wai#1020) ## 0.2.5 * Thread less autoupdate [#1018](yesodweb/wai#1018) ## 0.2.4 * Simple refactoring. ## 0.2.3 * [#996](yesodweb/wai#996): Refactored the `Control.Debounce` logic to not leak threads. * [#996](yesodweb/wai#996): Added extra `DebounceEdge` options for different types of debouncing. * `LeadingMute`: Action on first trigger, and ignore any triggers during cooldown * `TrailingDelay`: First trigger starts cooldown, and triggers during cooldown extend the cooldown. Action when cooldown expires. ## 0.2.2 * NewAPI: updateThreadName, reaperThreadName, debounceThreadName: Names can be given via this field to threads for GHC.Conc.Sync.listThreads. ## 0.2.1 * Labeling threads.
Ok, so I've tried to rework the debouncing, because of issue #980, but it seems to fail on a test because the trigger
MVardoesn't seem to be correctly filled unless I put atracein a specific spot!?Does anyone know how to force/evaluate (or whatever is happening here) the
tryPutMVarwithout usingtrace?Still TODO:
After submitting your PR: