My bad. After double-checking my code, I realized that some branches were
dispatching their work, which of course breaks that model. Sorry, and thanks
for clarification that this is how it should works.
> On 11 Aug 2016, at 17:39, Joe Groff wrote:
>
>>
>> On Aug 11, 2016, at 7:16 AM, Sebasti
> On Aug 11, 2016, at 7:16 AM, Sebastian Hagedorn via swift-users
> wrote:
>
> We often write code that returns early, but has to make sure a bit of code
> (e.g., a completion handler) is always called whenever we return, which seems
> like a great use case for defer. I started to write this:
We often write code that returns early, but has to make sure a bit of code
(e.g., a completion handler) is always called whenever we return, which seems
like a great use case for defer. I started to write this:
func execute(with completion: ((Bool) -> Void)?) {
var success = false