leonoel / missionary

A functional effect and streaming system for Clojure/Script
Eclipse Public License 2.0
636 stars 26 forks source link

How can an observer signalize termination? #6

Open lgrapenthin opened 5 years ago

lgrapenthin commented 5 years ago

Skimming the java impl, I noticed that passing the cancellation callback to event-fn is one possiblity (?), but, while it works, it also results in event-fn being emitted from the observer and doesn't seem like the canonical way. Probably invoking the event-fn with itself would be nice.

leonoel commented 5 years ago

What is the use case ?

lgrapenthin commented 5 years ago

None, just playing around with the semantics... I'm very used to core.async, where termination usually is propagated on producer site via closing of consumer channels. I now understand things work in the other direction here, were consumers propagate cancellation to producers. Feel free to ignore this issue.