mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
Motivation: NIOLock uses a storage object constructed from a ManagedBuffer. In general this is fine, but it's a tricky API to use safely and we want to avoid violating any of its guarantees. Modifications: - Store the value in the header and the lock in the elements - Add debug assertions on alignment Result: We'll be a bit more confident of the use of NIOLock