swift-atomics icon indicating copy to clipboard operation
swift-atomics copied to clipboard

Mark managed atomic constructs Sendable if their payloads are

Open lorentey opened this issue 4 years ago • 8 comments

Resolves #45.

Checklist

  • [X] I've read the Contribution Guidelines
  • [X] My contributions are licensed under the Swift license.
  • [X] I've followed the coding style of the rest of the project.
  • [ ] I've added tests covering all new code paths my change adds to the project (if appropriate).
  • [X] I've verified that my change does not break any existing tests.
  • [ ] I've updated the documentation if necessary.

lorentey avatar Sep 23 '21 22:09 lorentey

@swift-ci test

lorentey avatar Sep 23 '21 22:09 lorentey

17:36:08 
/Users/buildnode/jenkins/workspace/pr-swift-atomics-macos/branch-main/swift-atomics/Sources/Atomics/autogenerated/HighLevelTypes.swift:105:26: error: unknown attribute 'unchecked'
17:36:08 extension ManagedAtomic: @unchecked Sendable where Value: Sendable {}
17:36:08                          ^
17:36:08 /Users/buildnode/jenkins/workspace/pr-swift-atomics-macos/branch-main/swift-atomics/Sources/Atomics/autogenerated/HighLevelTypes.swift:82:14: error: non-final class 'ManagedAtomic' cannot conform to `Sendable`; use `UnsafeSendable`
17:36:08 public class ManagedAtomic<Value: AtomicValue> {
17:36:08              ^

ಠ_ಠ

lorentey avatar Sep 24 '21 01:09 lorentey

@swift-ci test

lorentey avatar Sep 24 '21 03:09 lorentey

@swift-ci test macOS platform

lorentey avatar Sep 24 '21 19:09 lorentey

@swift-ci test

lorentey avatar Sep 24 '21 21:09 lorentey

@swift-ci test

lorentey avatar Sep 30 '21 20:09 lorentey

@swift-ci test

lorentey avatar Nov 09 '21 04:11 lorentey

It'd be great to land this so consumers don't need to @preconcurrency import Atomics.

jpsim avatar Aug 09 '22 18:08 jpsim

It'd be great to land this so consumers don't need to @preconcurrency import Atomics.

+1

weissi avatar Mar 16 '23 13:03 weissi

@swift-ci test

lorentey avatar Mar 17 '23 21:03 lorentey