Skip to content

Commit

Permalink
Merge pull request #1639 from groue/dev/GRDB7-sendable-async-sequence
Browse files Browse the repository at this point in the history
GRDB 7: ValueObservation async sequence is Sendable
  • Loading branch information
groue authored Sep 28, 2024
2 parents c404e2d + 6b2cceb commit dc20709
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions GRDB/ValueObservation/ValueObservation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,13 @@ extension ValueObservation {
///
/// You build an `AsyncValueObservation` from ``ValueObservation`` or
/// ``SharedValueObservation``.
public struct AsyncValueObservation<Element: Sendable>: AsyncSequence {
public struct AsyncValueObservation<Element: Sendable>: AsyncSequence, Sendable {
public typealias BufferingPolicy = AsyncThrowingStream<Element, Error>.Continuation.BufferingPolicy
public typealias AsyncIterator = Iterator

var bufferingPolicy: BufferingPolicy
// AsyncThrowingStream.Continuation.BufferingPolicy is obviously
// Sendable, but lacks Sendable conformance.
nonisolated(unsafe) var bufferingPolicy: BufferingPolicy
var start: ValueObservationStart<Element>

public func makeAsyncIterator() -> Iterator {
Expand Down

0 comments on commit dc20709

Please sign in to comment.