-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
For a standard reaction model:
########## ----> ########### ----> ##########
# Signal # # Derived # # Effect #
########## < - - ########### < - - ##########
A Derived referenced only by Signals is unreachable and should be GC’d, yet we can’t make every Signal → Derived reference weak or the Derived may vanish too soon.
Solution: give Derived an unsubscribe method that disposes it once no BaseComputation holds it.
Edit: or in a
BaseComputation.__del__
We may also need to remind users not to treat Derived as a lazy Effect. But wait, then what can they use if they just need a lazy Effect? So we may implement a weak=False attribute in Derived and AsyncDerived to allow user control the lifespan of a Derived (just like we provide force_flush=True for Batchs).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request