File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 33## Upcoming
44
55- refactor: remove ` WithState ` as it wasn't doing anything beyond ` functools.wraps `
6+ - refactor: autorun doesn't inform subscribers when the output value is not changed
67
78## Version 0.22.2
89
Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ def _call(
270270 ** kwargs ,
271271 )
272272 create_task = self ._store ._create_task # noqa: SLF001
273+ previous_value = self ._latest_value
273274 if iscoroutine (value ) and create_task :
274275 if self ._options .auto_await :
275276 future = Future ()
@@ -294,7 +295,8 @@ def _call(
294295 )
295296 else :
296297 self ._latest_value = value
297- self .inform_subscribers ()
298+ if self ._latest_value is not previous_value :
299+ self .inform_subscribers ()
298300
299301 def __call__ (
300302 self : Autorun [
You can’t perform that action at this time.
0 commit comments