Re: Blocking behavior of >!! ?
( > The documentation for >!! reads: > > - > clojure.core.async/>!! > ([port val]) > puts a val into port. nil values are not allowed. Will block if no > buffer space is available. Returns true unless port is already closed. > > > I have a case where I believe that the channel has no buffer, I park a > "pseudothread" in a go block reading off that channel via (lexically, not temporally), put to the unbuffered channel via >!!: > > (let [c (chan) ;; NO BUFFER! > d (go ( e (>!! c 42)] ;; blocking write to c, will unpark c's pseudothread > (println {:c-coughs-up '(this will hang ( :d-coughs-up ( :what's-ee}) > (close! c) (close! d)) > > {:c-coughs-up (this will hang ( > > This case leads me to wonder whether the documentation might read > > >!! will block if there is no buffer space available *and* if there is > no *rendezvous *available, that is, no pseudothread parked waiting for > but it's more likely that I completely misunderstand core.async because I > just made up the notion of a pseudothread in my struggle to understand! > > > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/8c187aad-b746-490a-b6f8-3abfcdaa7533%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Blocking behavior of >!! ?
The documentation for >!! reads: - clojure.core.async/>!! ([port val]) puts a val into port. nil values are not allowed. Will block if no buffer space is available. Returns true unless port is already closed. I have a case where I believe that the channel has no buffer, I park a "pseudothread" in a go block reading off that channel via !!: (let [c (chan) ;; NO BUFFER! d (go (!! c 42)] ;; blocking write to c, will unpark c's pseudothread (println {:c-coughs-up '(this will hang (!! will block if there is no buffer space available *and* if there is no *rendezvous *available, that is, no pseudothread parked waiting for 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. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/ef62965f-6132-4f18-9bb8-3d569f10dbdc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ANN] Logic WorkBench lwb Rev 2.0.0
A new version of the logic workbench with a component for combinatory logic, together with a ton of examples. See https://github.com/esb-lwb/lwb/wiki. Burt -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/fc49cf0e-2970-4a70-901a-6664628e853a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.