There are a couple of other cases where having the signal graph be frozen avoids some hard-to-specify and hard-to-reason-about behaviours, like calling .unwatch within a watched callback. Here we generalise the notifying trap to a general "freeze the signal graph" mechanism and use it to protect unwatched and watched callbacks.
There are a couple of other cases where having the signal graph be frozen avoids some hard-to-specify and hard-to-reason-about behaviours, like calling
.unwatch
within awatched
callback. Here we generalise thenotifying
trap to a general "freeze the signal graph" mechanism and use it to protectunwatched
andwatched
callbacks.As discussed in the community call 2024-05-12.
Fixes #211 Fixes #206
Thoughts?