Mutexes and Closure Capture in Swift

Matt Gallagher: Using a mutex in Swift isn’t particularly difficult but I’m going to use the topic to highlight a subtle performance nuisance in Swift: dynamic heap allocation during closure capture. We want our mutex to be fast but passing a closure to execute inside a mutex can reduce the performance by a factor of … Continue reading Mutexes and Closure Capture in Swift