[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Blog post on Irmin/CueKeeper
Le mardi, 23 juin 2015 Ã 16:08, Thomas Leonard a Ãcrit : > Ah, I'd forgotten about switch (this is "join" in monad terminology, right?). Yes. > I should probably replace most of the binds with this (being careful > that they don't return an existing signal, though). Yes that's the reason why I prefer weak references no need to ask yourself such questions. > Can we define "A handler that isn't needed" as "A handler that would > be garbage collected if the GC ran now"? > > (or, if we had a glabal sink, "A handler that isn't a dependency of > the global sink") I'm not totally sure about what I'm going to write as I haven't got these things in my head. But I'm wondering if we couldn't maybe replace the weak refs by a reference counting mechanism (FRP is a dag of nodes, no cycle problems) and perform strong stops on the node once the count reaches `0`. The only thing that would be needed is a retain/release on the output nodes. retain you already need to do it in some way (otherwise your node gets gc'd). You'd still need to do releases but this would be hidden behind the sinks-like setters. Still even with this I would argue that this notion of "handler that isn't needed" shouldn't be relied upon as, i.e. you should manage that division by 0â Daniel _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |