Ha, Rich announced "offer!" and "poll!" in today's keynote.
http://youtu.be/4KqUvG8HPYo

I'm totally going to use
    (while (poll! my-channel))
unless we also get something like drainTo, as you mention.

(The problem with a (go ...) block is that I can't promise my caller than
the channel is now ready for his/her use, despite the fact that I'm doing
something that's safe to do synchronously.)

On Mon, Nov 10, 2014 at 6:16 AM, Herwig Hochleitner <[email protected]>
wrote:

> Your argument makes sense, Javascript's limitation on blocking doesn't
> apply when wanting to read only available elements.
> I see little chance to have alt!! added to the cljs port, if it would need
> a mandatory :default arm there. Also, as Thomas noted, putting the recur
> into the :default would make that a polling loop, which is about the last
> thing I'd want to see in a browser app.
>
> Maybe a better approach would be to push for a 'read available elements'
> operation similar to java.util.concurrent.BlockingQueue.drainTo
>
> kind regards
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to