File tree 1 file changed +4
-3
lines changed
Plugins/AWSLambdaPackager
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ struct Utils {
35
35
defer { fclose ( stdout) }
36
36
37
37
// We need to use an unsafe transfer here to get the fd into our Sendable closure.
38
- // This transfer is fine, because we guarantee that the code in the outputHandler
39
- // is run before we continue the functions execution, where the fd is used again.
40
- // See `process.waitUntilExit()` and the following `outputSync.wait()`
38
+ // This transfer is fine, because we write to the variable from a single SerialDispatchQueue here.
39
+ // We wait until the process is run below process.waitUntilExit().
40
+ // This means no further writes to output will happen.
41
+ // This makes it save for us to read the output
41
42
struct UnsafeTransfer < Value> : @unchecked Sendable {
42
43
let value : Value
43
44
}
You can’t perform that action at this time.
0 commit comments