Skip to content

Commit caea70b

Browse files
committed
Avoid using vendored lock in BroadcastAsyncSequence
Motivation: ManagedBuffer is explicitly not 'Sendable' on Swift nightly builds. As a result, our Lock type stops being 'Sendable'. This is only used by the 'BroadcastAsyncSequence'. Modifications: - Modify 'BroadcastAsyncSequence' to use 'Mutex'. One downside to this approach is that when a subscribe wants to consume an element and there's no element available, the lock must be released and then re-acquired once a continuation has been created. - Remove our lock, and update NOTICES.txt to reflect the fact we no longer use a copy of NIOs lock. Result: - Less code - CI passes
1 parent 07e38e9 commit caea70b

File tree

3 files changed

+40
-333
lines changed

3 files changed

+40
-333
lines changed

NOTICES.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,6 @@ under the License.
1717

1818
-------------------------------------------------------------------------------
1919

20-
This product uses scripts derived from SwiftNIO's integration testing
21-
framework: 'test_01_allocation_counts.sh', 'run-nio-alloc-counter-tests.sh' and
22-
'test_functions.sh'.
23-
24-
It also uses derivations of SwiftNIO's lock 'NIOLock.swift' and locked value box
25-
'NIOLockedValueBox.swift'.
26-
27-
* LICENSE (Apache License 2.0):
28-
* https://github.com/apple/swift-nio/blob/main/LICENSE.txt
29-
* HOMEPAGE:
30-
* https://github.com/apple/swift-nio
31-
32-
---
33-
3420
This product uses derivations of SwiftNIOHTTP2's implementation of case
3521
insensitive comparison of strings, found in 'HPACKHeader.swift'.
3622

Sources/GRPCCore/Internal/Concurrency Primitives/Lock.swift

Lines changed: 0 additions & 291 deletions
This file was deleted.

0 commit comments

Comments
 (0)