<div dir="ltr">What are your thoughts on error handling? <div><br></div><div>Exec::run() returns an Exec::Result, which is nice in that we can recover if something goes wrong. I would think one would want most calls of Exec::run() in an async context, but we lose the return value. </div><div><br></div><div>   ...alan<br><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 19, 2017 at 9:39 AM, Robin Sommer <span dir="ltr">&lt;<a href="mailto:robin@icir.org" target="_blank">robin@icir.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">At BroCon a few folks asked me about the proposed &quot;async&quot; keyword for<br>
Bro&#39;s scripting language. &quot;async&quot; is coroutine-style language<br>
construct that puts blocking operations on hold until they conclude,<br>
working on other stuff first. It could replace most uses of &quot;when&quot; and<br>
is arguably much nicer to use.<br>
<br>
&quot;async&quot; is implemented as a proof-of-concept in the topic/robin/async<br>
branch. Note that that Bro branch is not fully functional at the<br>
moment, nor are performance implications clear. However, before going<br>
any further with it I&#39;d like to reach consensus if the current<br>
implementation is acceptable for the Bro code base, as it&#39;s very<br>
low-level and not easy to follow. I&#39;d be interested in opinions here.<br>
<br>
The commit to look at is:<br>
<a href="https://github.com/bro/bro/commit/8653b333431648e5a33d61c3f61c6d093cff5b72" rel="noreferrer" target="_blank">https://github.com/bro/bro/<wbr>commit/<wbr>8653b333431648e5a33d61c3f61c6d<wbr>093cff5b72</a><br>
<br>
The exercise here is: Can you understand how &quot;async&quot; works? (If you<br>
can honestly answer &quot;yes&quot; in under 15 minutes, I buy you a beer. ;-)<br>
<br>
Robin<br>
<br>
PS: See the TODOs in that commit for the current state of the code.)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Robin Sommer * ICSI/LBNL * <a href="mailto:robin@icir.org">robin@icir.org</a> * <a href="http://www.icir.org/robin" rel="noreferrer" target="_blank">www.icir.org/robin</a><br>
______________________________<wbr>_________________<br>
bro-dev mailing list<br>
<a href="mailto:bro-dev@bro.org">bro-dev@bro.org</a><br>
<a href="http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev" rel="noreferrer" target="_blank">http://mailman.icsi.berkeley.<wbr>edu/mailman/listinfo/bro-dev</a><br>
</font></span></blockquote></div><br></div></div></div>