Stream.interval could be moved to using :timer.send_after
The process created by Stream.start_link would need to special case an interval Stream.
That's a specific case, but the more general case is "How do we avoid blocking in our Stream?"
I think a new Stream behavior might be interesting. It would facilitate code change as well as a more asynchronous pattern for receiving messages.
I'm not sure about the details, which is where it might get messy, but the idea is worth exploring in my opinion.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CA%2BibZ99vokaNHcNxT4tJGapdKE7FW5sFXennVu9i3L0_Hcb3UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
It may just be a lack of coffee at the moment, but I'm having a hard time seeing how this would be usedin anything other than the case where you only care about the Streams side effects.
If we start thinking in Dataflow terms we have sources, sinks and tranforms. The currentStream module has a couple source functions, one sink and is mostly transforms. It mightmake sense to pull the source/sink functions into their own module and make Streamsjust a module of transforms.The problem is that Streams is a great name for a Dataflow module, but it's already inuse for a module that is largely just Transforms. Renaming Streams to Tranforms wouldbe too confusing.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ba53b773-6d5b-454f-aa59-f19eb2bbeeba%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAK%3D%2B-Tv_xjyum2j7zLYPiZaUABvys4Vzjc8gT6VR49vz%3Dy5Odg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAEKz3thzm-hdBx1rvX9PzadnXrj8hE1rbkZyiP7pgU4XrXuV_Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnzG608BwQ9qTWWVRzqrBWd%3Dsd44Oa8BH2NJ%2BSyxXvAL-w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAEKz3tjj0X9XjCpWUNUn1Na%2BL%2B7fcaG%2BHADw%3DdkrH_LazmYA%2BQ%40mail.gmail.com.
That's just my two cents though, I admit I don't have strong feelings one way or the other because I haven't dealt with any pain points with the current API myself, I'm mostly arguing from the position of keeping things simple unless there is a clear reason not to. You did mention that there have been many people confused about what Stream really does, but my question would be why are they confused. Is it because they are trying to intuit their way through the standard library and Stream breaks their expectations? Are they reading the Stream docs and walking away confused? I think those are some important things to know before using that as a reason to change Stream as it exists today (outside the context of James changes that is).
+1 for Stream.Process or Stream.Runner
Perhaps use Task.Supervisor as an example as well? Stream.Supervisor?
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ff25bb3d-1533-4ee0-8d99-648151b47c57%40googlegroups.com.