It should be noted that your async macro does in fact use the dispatcher just like a normal go would, the only difference is that it will start executing immediately in the current thread until the first "pause" instead of dispatching. After the "pause" the dispatcher will run it though which is not guaranteed to be the same thread.
Therefore I'm not actually sure a ThreadLocal will work. Did you test that you get the actual correct result?
Your benchmark is also not very useful, you are basically just measuring the frameworks overhead which is tiny to what it provides. In actual programs most of the time will not be spent in core.async internals, at least not from what I have observed so far. go blocks are actually pretty cheap.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.