Clojure JIRAhttp://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&jqlQuery=project+%3D+10277+AND+labels+%3D+%22go%22
An XML representation of a search requesten-us4.464925-07-2011[ASYNC-179] parking take in finally clause in go block causes try expression to yield the finally clause resulthttp://dev.clojure.org/jira/browse/ASYNC-179
core.async<p>Inside a go block, in a try-catch-finally clause, <br/>
if the finally-clause consists of a parking take (&lt;!), <br/>
the try-catch-finally will yield the result of the finally, instead of the try body.</p>
<p>e.g</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">(a/&lt;!! (go
(<span class="code-keyword">try</span> :a
(<span class="code-keyword">finally</span> :b))))
=&gt; :a ;; expected
;; whereas:
(a/&lt;!! (go
(<span class="code-keyword">try</span> :a
(<span class="code-keyword">finally</span> (&lt;! (go :b))))))
=&gt; :b ;; wrong</pre>
</div></div>
<p><a href="https://github.com/vvvvalvalval/core-async-take-in-finally-repro/blob/master/src/core_async_repro/repro.cljc">Repro project on Github.</a></p>
core.async 0.2.391, Clojure 1.8.0,
<br/>
<br/>
java version &quot;1.8.0_05&quot;
<br/>
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
<br/>
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
<br/>
<br/>
OS X Yosemite 10.10.5, MacBook Air (11-inch, Early 2015)ASYNC-179parking take in finally clause in go block causes try expression to yield the finally clause resultDefectMajorOpenUnresolvedUnassignedValentin Waeselynckgogo-macrotry-catchTue, 20 Sep 2016 10:44:38 -0500Tue, 20 Sep 2016 10:48:27 -050000<p>Duplicate of <a href="http://dev.clojure.org/jira/browse/ASYNC-122">http://dev.clojure.org/jira/browse/ASYNC-122</a>.</p>Global Rank[ASYNC-29] 50 parallel blocking takes in go-blocks as loop-binding or recur argument break gohttp://dev.clojure.org/jira/browse/ASYNC-29
core.async<p>This problem raises the question whether what the implications are of using &lt;!! and &gt;!! inside of go and whether it is legal. </p>
<p>What if I provide API functions that are using &lt;!! &gt;!! and may be invoked from within go? <br/>
Should I then also provide !! and ! versions? </p>
<p>Please evalute this code at the REPL to reproduce the problem: <a href="https://www.refheap.com/20225">https://www.refheap.com/20225</a></p>JVMASYNC-2950 parallel blocking takes in go-blocks as loop-binding or recur argument break goDefectMajorResolvedCompletedRich HickeyLeon Grapenthinbuggogo-macroMon, 28 Oct 2013 12:23:58 -0500Tue, 29 Oct 2013 09:55:41 -0500Tue, 29 Oct 2013 09:55:41 -050000<p>I'd like to rephrase my question: Do I have to provide {!} and {!!} macros that do the same thing and use {&lt;!} {&gt;!} and {&lt;!!} {&gt;!!} respectively? Would it make sense for core.async to provide a defasync macro that creates those two versions from the same body where you could for example use {&lt;!!!} and {&gt;!!!}, {alts!!!} and so on so that they would be replaced by a postwalk before the macro is defined defined twice with {!} and {!!} appended to the name? Or are there other plans of abstraction? <span class="error">&#91;Quoting symbols because of jira markup&#93;</span></p><p>You shouldn't be using &lt;!! and &gt;!! in library code. We may at some point be able to detect at runtime their use in go blocks and throw errors, but currently do not.</p>Global Rank[ASYNC-24] dosync does not work inside go macrohttp://dev.clojure.org/jira/browse/ASYNC-24
core.async<p>The following code results in an exception:</p>
<p>=&gt; (go (dosync nil))</p>
<p>CompilerException java.lang.RuntimeException: No such var: clojure.core/runInTransaction</p>Clojure 1.5.1 in the JVM, core.async-0.1.0-20130827.050117-78&quot;ASYNC-24dosync does not work inside go macroDefectMajorClosedCompletedTimothy BaldridgeMichael Ummelsbug,goSun, 15 Sep 2013 12:38:03 -0500Thu, 31 Oct 2013 09:20:13 -0500Thu, 31 Oct 2013 09:20:13 -050000<p>Fixed in master. Please close.</p><p>Fixed in master</p>Global Rank[ASYNC-20] Case macro in go block ignores default expressionhttp://dev.clojure.org/jira/browse/ASYNC-20
core.async<p>To reproduce the error use this code:<br/>
(go (case true<br/>
false false<br/>
nil))</p>
<p>An IllegalArgumentException will be thrown (as if there was no default expression).<br/>
Exception in thread "async-dispatch-46" java.lang.IllegalArgumentException: No matching clause: true</p>Clojure 1.5.1 in the JVM, core.async-0.1.0-20130819.220150-69ASYNC-20Case macro in go block ignores default expressionDefectMajorClosedCompletedTimothy BaldridgeLeon GrapenthinbuggoTue, 20 Aug 2013 09:57:48 -0500Fri, 27 Sep 2013 08:34:18 -0500Fri, 27 Sep 2013 08:34:18 -050000<p>fixed in: <a href="https://github.com/clojure/core.async/commit/f9b24552cf4f6b8b86f3377c7b7a42a618a9fd76">https://github.com/clojure/core.async/commit/f9b24552cf4f6b8b86f3377c7b7a42a618a9fd76</a></p>Global Rank