Skip to content

Commit cff44ba

Browse files
committed
Update docs
1 parent f4e5b9e commit cff44ba

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/_TestingInterop/FallbackEventHandler.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ private nonisolated(unsafe) let _fallbackEventHandler = {
3030
private nonisolated(unsafe) let _fallbackEventHandler = Atomic<UnsafeRawPointer?>(nil)
3131
#endif
3232

33-
/// A type describing a fallback event handler to invoke when testing API is
34-
/// used while the testing library is not running.
33+
/// A type describing a fallback event handler that testing API can invoke as an
34+
/// alternate method of reporting test events to the current test runner.
35+
///
36+
/// For example, an `XCTAssert` failure in the body of a Swift Testing test
37+
/// cannot record issues directly with the Swift Testing runner. Instead, the
38+
/// framework packages the assertion failure as a JSON `Event` and invokes this
39+
/// handler to report the failure.
3540
///
3641
/// - Parameters:
3742
/// - recordJSONSchemaVersionNumber: The JSON schema version used to encode
@@ -50,11 +55,6 @@ package typealias FallbackEventHandler = @Sendable @convention(c) (
5055
/// Get the current fallback event handler.
5156
///
5257
/// - Returns: The currently-set handler function, if any.
53-
///
54-
/// - Important: This operation is thread-safe, but is not atomic with respect
55-
/// to calls to ``setFallbackEventHandler(_:)``. If you need to atomically
56-
/// exchange the previous value with a new value, call
57-
/// ``setFallbackEventHandler(_:)`` and store its returned value.
5858
@_cdecl("_swift_testing_getFallbackEventHandler")
5959
@usableFromInline
6060
package func _swift_testing_getFallbackEventHandler() -> FallbackEventHandler? {

0 commit comments

Comments
 (0)