<div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div>`beginAsync(_:)` is a sort of poor man&#39;s `Future`—it guarantees that the async function will start, but throws away the return value, and *might* throw away the error unless it happens to get thrown early. Given that its ability to return information from the body is so limited, I frankly don&#39;t think it&#39;s worth making this function rethrow only some errors. I would instead make it accept only a non-throwing `async` function, and if you need to call something that throws, you can pass an async closure with a `do`/`catch` block.</div></div></blockquote><div class="gmail_extra"><div><br></div><div>I agree. I think `rethorws` for `beginAsync` is problematic.</div><div><br></div><div>For example, what happens when the `foo` in the following code throws an `Error` asynchronously?</div><div><br></div><div>func foo() async throws { ... }</div><div>beginAsync(foo)<br></div><div><br></div><div>`foo` is acceptable as `beginAsync`&#39;s `body` by its type. However its error might be thrown asynchronously and it is impossible to rethrow it. So the error must be ignored or treated as an universal error by untyped propagation. It breaks type safety about error handling.</div><div><br></div><div>So I think the signature of `beginAsync` should be the following one.<br></div><div><br></div><div>func beginAsync(_ body: () async -&gt; Void) -&gt; Void<br></div><div><br></div>--</div><div class="gmail_extra">Yuta</div></div>