Skip to content

Commit 57e2396

Browse files
sebstofabianfett
andauthored
Update Sources/AWSLambdaRuntime/LambdaRuntime.swift
Co-authored-by: Fabian Fett <[email protected]>
1 parent 23c4b64 commit 57e2396

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/AWSLambdaRuntime/LambdaRuntime.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public final class LambdaRuntime<Handler>: @unchecked Sendable where Handler: St
5757
public func run() async throws {
5858

5959
// we use an atomic global variable to ensure only one LambdaRuntime is running at the time
60-
let (_, original) = _isRunning.compareExchange(expected: false, desired: true, ordering: .relaxed)
60+
let (_, original) = _isRunning.compareExchange(expected: false, desired: true, ordering: .acquiringAndReleasing)
6161

6262
// if the original value was already true, run() is already running
6363
if original {

0 commit comments

Comments
 (0)