You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is at least an issue with documentation.
It's not clear from reading the examples or the manual how a reflex-frp program might deal with scarce resources, i.e. resources which must be freed promptly (not left up to a finalizer). I'd like to think that FRP would be a good fit for managing complex object lifetimes (particularly object creation when needed). On the other hand from reflex-frp/reflex-dom#114 it looks as guaranteed destruction might be problematic with reflex.
Either way I think it might be good to at least have a footnote or something somewhere with some greppable terms related to resource management.
The text was updated successfully, but these errors were encountered:
This is definitely something that would be nice to have. Reflex's built-in resource management is all GC-driven, so it's only appropriate for situations where prompt destruction is not required. However, we do have a system that can be leveraged for this: Adjustable. In reflex-dom, when widgets are removed from the DOM, it happens, of course, promptly. We also use this in QueryT to promptly unsubscribe from queries that we're no longer interested in.
My basic idea for this would be that a "disposable" widget provides a "disposal" routine to its parent, inside of a Behavior or a Dynamic. When the widget is removed by Adjustable, the disposal routine will be invoked. Do you think that would cover your use case?
On Tue, May 19, 2020, 2:12 AM Ryan Trinkle ***@***.***> wrote:
This is definitely something that would be nice to have. Reflex's built-in
resource management is all GC-driven, so it's only appropriate for
situations where prompt destruction is not required. However, we do have a
system that can be leveraged for this: Adjustable. In reflex-dom, when
widgets are removed from the DOM, it happens, of course, promptly. We also
use this in QueryT to promptly unsubscribe from queries that we're no
longer interested in.
My basic idea for this would be that a "disposable" widget provides a
"disposal" routine to its parent, inside of a Behavior or a Dynamic. When
the widget is removed by Adjustable, the disposal routine will be invoked.
Do you think that would cover your use case?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#428 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXACSJYNZZBW5BFZPNTRSF3ANANCNFSM4NDZQRLQ>
.
I think this is at least an issue with documentation.
It's not clear from reading the examples or the manual how a reflex-frp program might deal with scarce resources, i.e. resources which must be freed promptly (not left up to a finalizer). I'd like to think that FRP would be a good fit for managing complex object lifetimes (particularly object creation when needed). On the other hand from reflex-frp/reflex-dom#114 it looks as guaranteed destruction might be problematic with reflex.
Either way I think it might be good to at least have a footnote or something somewhere with some greppable terms related to resource management.
The text was updated successfully, but these errors were encountered: