Hi! My coworkers and I noticed a small issue in the code in Chapter 7: when a task fails in worker(number:)
, it returns without calling await onTaskCompleted()
. On my computer, that results in the scheduled count going from 4 up to 5 when it first encounters a failing task. Obviously not a big deal, but just FYI.
I wonder if there’s a better solution than just copying and pasting that line before the return. I couldn’t think of a good one (defer
doesn’t seem to work with await
). Otherwise, interesting chapter!