apple/swift-nio
在 GitHub 查看NIOLoopBound should get `unchecked` variants that are truly free in release mode
Open
#2,506 建立於 2023年8月17日
good first issuekind/enhancement
倉庫指標
- Star
- (8,453 star)
- PR 合併指標
- (平均合併 9天 10小時) (30 天內合併 15 個 PR)
描述
NIOLoopBound(Box) is super useful when adopting Sendable but the eventLoop.preconditionInEventLoop() checks everywhere are expensive and -- for repeated accesses -- unnecessary.
There should be unchecked variants of init, get and set value that do eventLoop.assertInEventLoop() instead. Together with @inlinable that should become completely free in release mode (and still check in debug).
Docs: