Skip to content

Commit 8dda227

Browse files
committed
Replace custom Deque implementation with swift-collection Deque
# Motivation For AsyncStream we created a custom internal Deque implementation to use for the buffering. This implementation was relatively bare-bones compared to the one in swift-collections. Furthermore, it lacked some methods that we need to implement the new `AsyncStream` APIs that support producer backpressure. # Modification This PR copies over the Deque implementation of swift-collections and makes it internal and non-inlinable. # Result We now have a fully functional Deque.
1 parent a5f2f76 commit 8dda227

21 files changed

+2894
-426
lines changed

stdlib/public/Concurrency/CMakeLists.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,25 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
126126
AsyncStream.swift
127127
AsyncThrowingStream.swift
128128
AsyncStream.cpp
129-
Deque.swift
129+
Deque/_DequeBuffer.swift
130+
Deque/_DequeBufferHeader.swift
131+
Deque/_DequeSlot.swift
132+
Deque/_UnsafeWrappedBuffer.swift
133+
Deque/Compatibility.swift
134+
Deque/Deque+Storage.swift
135+
Deque/Deque+UnsafeHandle.swift
136+
Deque/Deque.swift
137+
Deque/Deque+Codable.swift
138+
Deque/Deque+Collection.swift
139+
Deque/Deque+CustomDebugStringConvertible.swift
140+
Deque/Deque+CustomReflectable.swift
141+
Deque/Deque+CustomStringConvertible.swift
142+
Deque/Deque+Equatable.swift
143+
Deque/Deque+ExpressibleByArrayLiteral.swift
144+
Deque/Deque+Extras.swift
145+
Deque/Deque+Hashable.swift
146+
Deque/Deque+Testing.swift
147+
Deque/UnsafeMutableBufferPointer+Utilities.swift
130148
${swift_concurrency_extra_sources}
131149
linker-support/magic-symbols-for-install-name.c
132150

0 commit comments

Comments
 (0)