Hi Atamert, For future reference, posting these questions to https://groups.google.com/forum/#!forum/aleph-lib will ensure I'll see them sooner.
The `source-only` method is just a way to make sure that the chance for confusion is minimized, it doesn't prevent the underlying object from being used normally. As for your scenario, I'm not sure I completely understand. In a standard stream, the flow of data is: [ sink -> source ] So if you `put!` something into the sink, you can `take!` it from the source. If you use `source-only` and connect that to some other sink, then the flow of data will be [ sink -> source ] -> sink So the source is only connected to one sink, not two. Maybe I'm misunderstanding you, though. Zach On Thursday, August 27, 2015 at 4:13:35 AM UTC-7, Atamert Ölçgen wrote: > > Hi, > > AFAIK the only way to create (just) a source (or sink) is: > > (def my-source (s/source-only (s/stream ...))) > > This results in creating a stream and then wrapping it with a SourceProxy. > We don't keep a reference to the stream and the SourceProxy doesn't allow > taking. > > But if I'm not missing something since SourceProxy keeps a reference of > the original stream, there is a sink nobody is using there. > > If I create a sink separately and connect my-source to it, now > my-source would be connected to two sinks. > > My questions are: > > 1. Is there another method for creating only sinks or sources? > 2. Should the extra/unused source/sink I mentioned above cause concern? > > PS: I'm not talking about a scenario where we're creating thousands > streams and connecting them all like there's no tomorrow. > > > -- > Kind Regards, > Atamert Ölçgen > > ◻◼◻ > ◻◻◼ > ◼◼◼ > > www.muhuk.com > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.