Michael Long
5 days ago

--

Going to quibble a bit with the "efficiency" of the thread-safe buffer, in that it effectively leaves each thread with an ever expanding buffer. That's especially problematic in system-provided threads that tend to be returned to the pool for later reuses.

Better, perhaps, to allocate the buffer in a class or actor such that it can be destroyed when the instance is no longer needed.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet