btw on the subject of “should I use NSOperationQueue or libdispatch”, since it came up, my concrete recommendation is: you should really strongly consider not writing async/concurrent code.

I know this sounds weird in 2018, but the cost in complexity *and* performance is high.
There are absolutely cases it’s worthwhile, but empirically the cutoff point leans more single threaded than most programmers think it does.
I dug up a comment I wrote last April to warn future maintainers of the daemon I wrote not to reintroduce parallel handling of request contents. Ideally, we would multiplex all requests onto one priority-ordered queue too for a nice perf win, but for arcane reasons it’s unsafe.
You can follow @Catfish_Man.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: