Gwendal Roué
ff2a75489d
StrictConcurrency: ValueWriteOnlyObserver is Sendable
...
Required for DatabaseCancellable conformance
2024-07-27 16:37:33 +02:00
Gwendal Roué
b4677dede4
StrictConcurrency: DatabaseRegionConvertible is Sendable
...
A ValueObservation will use such an object from database readers, writers, and the main thread: they must support all isolation domains.
2024-07-27 16:37:33 +02:00
Gwendal Roué
8f486a5e41
StrictConcurrency: fix warning about AnyDatabaseCancellable initializer
2024-07-27 16:37:33 +02:00
Gwendal Roué
484224c654
StrictConcurrency: fix warning about Inflections.default
2024-07-27 16:37:33 +02:00
Gwendal Roué
7f5205ef8c
Rename ReadWriteBox to ReadWriteLock
...
... and make it conditionally Sendable, and it is no longer a property wrapper.
It is conditionally Sendable because we can't use the techniques of the future standard Mutex (SE-0433 Synchronous Mutual Exclusion Lock, https://github.com/apple/swift-evolution/blob/main/proposals/0433-mutex.md ).
It is no longer a property wrapper because the Swift compiler can perform strict concurrency checks through a `var` property.
2024-07-27 16:37:33 +02:00
Gwendal Roué
99715892e7
StrictConcurrency: fix warning about StatementArgumentsSink.literalValues
2024-07-27 16:37:33 +02:00
Gwendal Roué
e022c35b49
StrictConcurrency: OrderedDictionary is conditionally Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
5a2c15b82e
StrictConcurrency: DatabasePromise initializer requires a Sendable value
2024-07-27 16:37:33 +02:00
Gwendal Roué
88539df543
StrictConcurrency: use a Sendable strong reference
2024-07-27 16:37:33 +02:00
Gwendal Roué
991d2c8bbc
StrictConcurrency: UIApplication is MainActor-isolated
2024-07-27 16:37:33 +02:00
Gwendal Roué
3995bfdbec
StrictConcurrency: workaround warning about UIApplication.xxxNotification
2024-07-27 16:37:33 +02:00
Gwendal Roué
6aa43ded3c
Enable strict concurrency checks
2024-07-27 16:37:33 +02:00
Gwendal Roué
b11c5dd25b
DatabaseCursor has a primary associated type
2024-07-27 16:37:33 +02:00
Gwendal Roué
a474a674b4
Project organization
2024-07-27 16:37:33 +02:00
Gwendal Roué
6c73b1c5c8
Cleanup ValueReducer
2024-07-27 16:37:33 +02:00
Gwendal Roué
2ce8a6191d
Split Row.swift into focused files
2024-07-27 16:37:33 +02:00
Gwendal Roué
eed2ae03ae
TODO
2024-07-27 16:37:33 +02:00
Gwendal Roué
ac33856f31
SQL is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
9545bf70e2
SQLRelation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
f2b0b1869c
⚠️ Make TableAlias Sendable even if it is not yet.
2024-07-27 16:37:33 +02:00
Gwendal Roué
05899228fd
DatabasePromise is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
735175e902
FTS5 tokenizers don't need to be Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
9b2466c2aa
Fix a concurrency warning
2024-07-27 16:37:33 +02:00
Gwendal Roué
cfd4a71efa
writePublisher(updates:thenRead:) requires a Sendable Value
...
... But I don't know if region-based isolation and SE-0430 can relax this constraint or not.
2024-07-27 16:37:33 +02:00
Gwendal Roué
e6a7d7dad4
Fix concurrency warning on SQLITE_TRANSIENT
2024-07-27 16:37:33 +02:00
Gwendal Roué
3b593d7649
ValueObservation.handleEvents accept Sendable closures
2024-07-27 16:37:33 +02:00
Gwendal Roué
3476b6348a
ValueObservationScheduler async access requires a Sendable closure
2024-07-27 16:37:33 +02:00
Gwendal Roué
7d7dc8ea72
SerializedDatabase async access requires a Sendable closure
2024-07-27 16:37:33 +02:00
Gwendal Roué
7fd34012b4
WALSnapshotTransaction is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
2aabc4c10e
OnDemandFuture fulfill is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
f13b2d2eb4
Pool is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
57a86a0e2a
ReadWriteBox is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
40090dbe00
Fix concurrency warnings with DispatchSpecificKey
2024-07-27 16:37:33 +02:00
Gwendal Roué
f362518dd6
LogErrorFunction is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
4d9d67dd67
DatabaseCollation is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
8429eb68dd
ValueObservationScheduler is Sendable
2024-07-27 16:37:33 +02:00
Gwendal Roué
50285f4832
Record can't be made Sendable
...
... so that subclasses do not have to be sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
d138af2637
RowAdapter is Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
b26e9709e7
FilterCursor can't be made Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
dc0be3a10d
Database publishers can't be made Sendable
...
... because they wrap base publishers that are not :-/
2024-07-27 16:37:32 +02:00
Gwendal Roué
22114ad433
DatabaseMigrator is Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
6e691fe71d
DatabaseFunction is Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
05f7d3c8d4
[BREAKING] Remove DatabaseFuture and concurrentRead
...
That's one less DispatchSemaphore. We don't need this method anymore.
2024-07-27 16:37:32 +02:00
Gwendal Roué
264d7fb52e
Coding strategies are Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
54ffb21fb8
Configuration is Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
f7dc72a5f3
TransactionClock is Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
e0d8e20bef
BusyCallback and BusyMode are Sendable
2024-07-27 16:37:32 +02:00
Gwendal Roué
04d8c357b5
Tests need a Mutex too
2024-07-27 16:37:32 +02:00
Gwendal Roué
00ccab06bd
Rename LockedBox to Mutex
...
Maybe we'll be able to plug in the standard one eventually: https://forums.swift.org/t/pitch-synchronous-mutual-exclusion-lock/69889
2024-07-27 16:37:32 +02:00
Gwendal Roué
2f93f00b41
DatabaseCancellable is Sendable
2024-07-27 16:37:32 +02:00