It sounds possibly useful for a form of "load balancing". You have a producer put onto any of several channels, each with a consumer. If some consumers are backlogged the put will go to one that isn't backlogged, instead of blocking, if there's a consumer available. For a CPU-bound task where the consumer does jobs and the producer hands out jobs, you'd want as many consumers as there are hardware CPU cores, or maybe slightly more. Even if the jobs varied somewhat in size that might keep all the cores busy until there was almost no work left to be done (vs. handing out jobs in round-robin fashion, or pre-dividing the work among the CPUs).
On Mon, Sep 9, 2013 at 1:32 AM, Sean Corfield <seancorfi...@gmail.com>wrote: > Ah, I missed the 'put' part of it. No, haven't used that aspect yet. > > On Sun, Sep 8, 2013 at 10:09 PM, Timothy Baldridge <tbaldri...@gmail.com> > wrote: > > He's talking about puts and alts. You can actually do multiple puts at > once > > inside an alts! and only one of them will be used. Yes I haven't seen > them > > used either, I'm sure there's a use case, I haven't found it yet though. > > > > Timothy > > > > > > On Sun, Sep 8, 2013 at 9:35 PM, Sean Corfield <seancorfi...@gmail.com> > > wrote: > >> > >> We're using alts! to take a value or timeout, as part of machinery to > >> detect whether a popup opens or is blocked. > >> > >> On Sun, Sep 8, 2013 at 7:21 PM, Alan Shaw <noden...@gmail.com> wrote: > >> > I'm accustomed to using alts! to allow taking from a collection of > >> > core.async ports, but haven't come up with a use case for a put in > >> > alts!, > >> > either with or without takes. > >> > Have you? > >> > > >> > -A > >> > > >> > -- > >> > -- > >> > 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/groups/opt_out. > >> > >> > >> > >> -- > >> Sean A Corfield -- (904) 302-SEAN > >> An Architect's View -- http://corfield.org/ > >> World Singles, LLC. -- http://worldsingles.com/ > >> > >> "Perfection is the enemy of the good." > >> -- Gustave Flaubert, French realist novelist (1821-1880) > >> > >> -- > >> -- > >> 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/groups/opt_out. > > > > > > > > > > -- > > “One of the main causes of the fall of the Roman Empire was that–lacking > > zero–they had no way to indicate successful termination of their C > > programs.” > > (Robert Firth) > > > > -- > > -- > > 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/groups/opt_out. > > > > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > World Singles, LLC. -- http://worldsingles.com/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > > -- > -- > 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/groups/opt_out. > -- -- 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/groups/opt_out.