From 9d7cf6825e8c473d4c537cd81f229b477dec2ef6 Mon Sep 17 00:00:00 2001 From: hamzahrmalik Date: Tue, 14 Jan 2025 14:13:20 +0000 Subject: [PATCH] Clarify docs on EventLoopFuture/assumeIsolatedUnsafeUnchecked (#3058) - Clarify that it will only crash on release builds - Fix the claim that the function can be used from async contexts (it is marked noasync) --- Sources/NIOCore/EventLoopFuture+AssumeIsolated.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/NIOCore/EventLoopFuture+AssumeIsolated.swift b/Sources/NIOCore/EventLoopFuture+AssumeIsolated.swift index 951c8656fb..f743550fd5 100644 --- a/Sources/NIOCore/EventLoopFuture+AssumeIsolated.swift +++ b/Sources/NIOCore/EventLoopFuture+AssumeIsolated.swift @@ -606,11 +606,10 @@ extension EventLoopFuture { /// Returns a variant of this ``EventLoopFuture`` with less strict /// `Sendable` requirements. Can only be called from on the /// ``EventLoop`` to which this ``EventLoopFuture`` is bound, will crash - /// if that invariant fails to be met. + /// if that invariant fails to be met in debug builds. /// /// This is an unsafe version of ``EventLoopFuture/assumeIsolated()`` which - /// omits the runtime check in release builds and doesn't prevent you using it - /// from using it in async contexts. + /// omits the runtime check in release builds. @inlinable @available(*, noasync) public func assumeIsolatedUnsafeUnchecked() -> Isolated {