[Bro-Dev] 'async' keyword
Azoff, Justin S
jazoff at illinois.edu
Wed Sep 20 16:24:47 PDT 2017
> On Sep 20, 2017, at 7:12 PM, Alan Commike <commike at reservoir.com> wrote:
>
> What are your thoughts on error handling?
>
> 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.
>
> ...alan
It looks like this wouldn’t be lost at all, you would just go from
when (local res = Exec::run([$cmd="…"])){
do_something_with(res);
}
to
local res = async Exec::run([$cmd="…"]);
do_something_with(res);
—
Justin Azoff
More information about the bro-dev
mailing list