-
-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRDB 7: Sendable database accesses #1618
Commits on Sep 8, 2024
-
[SENDING REGRET] ValueObservationScheduler requires Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
Configuration menu - View commit details
-
Copy full SHA for 0b6ac87 - Browse repository at this point
Copy the full SHA 0b6ac87View commit details -
[SENDING REGRET] Pool async methods require Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
Configuration menu - View commit details
-
Copy full SHA for 55560cc - Browse repository at this point
Copy the full SHA 55560ccView commit details -
OnDemandFuture closure is Sendable
It can be called at any time, when the publisher is subscribed.
Configuration menu - View commit details
-
Copy full SHA for 6371dc0 - Browse repository at this point
Copy the full SHA 6371dc0View commit details -
[SENDING REGRET] SerializedDatabase.async requires a Sendable closure
We should be able to use a sending closure instead, but DispatchQueue.async does not accept sending closures yet.
Configuration menu - View commit details
-
Copy full SHA for c122872 - Browse repository at this point
Copy the full SHA c122872View commit details -
[SENDING REGRET] DatabaseMigrator.asyncMigrate requires a Sendable cl…
…osure We should be able to use a sending closure instead, but DispatchQueue.async does not accept sending closures yet.
Configuration menu - View commit details
-
Copy full SHA for b3ac63b - Browse repository at this point
Copy the full SHA b3ac63bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e35fb79 - Browse repository at this point
Copy the full SHA e35fb79View commit details -
[SENDING REGRET] Async database accesses require Sendable closures
We should be able to use sending closures instead, but DispatchQueue.async does not accept sending closures yet.
Configuration menu - View commit details
-
Copy full SHA for 62d96ec - Browse repository at this point
Copy the full SHA 62d96ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5585e47 - Browse repository at this point
Copy the full SHA 5585e47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28faa97 - Browse repository at this point
Copy the full SHA 28faa97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f384a4 - Browse repository at this point
Copy the full SHA 5f384a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec5b7d9 - Browse repository at this point
Copy the full SHA ec5b7d9View commit details -
[SENDING REGRET] Async database access methods return Sendable results
We can not tell the compiler that we can safely return `sending` results, because fetched values are in the same region as the `db` argument, according to SE-0414 (https://github.com/swiftlang/swift-evolution/blob/main/proposals/0414-region-based-isolation.md#rules-for-merging-isolation-regions). ``` class NotSendable { init() { } } func fetchNotSendable(_ db: Database) -> NotSendable { fatalError() } func notOK<T>(_ make: (Database) -> sending T) { } func ok<T>(_ make: () -> sending T) { } func usage() { ok { NotSendable() } // Returning a task-isolated 'NotSendable' value as a 'sending' result // risks causing data races. notOK { db in fetchNotSendable(db) } } ``` Various attempts at modifying all fetching methods so that they have a `sending` return value have failed.
Configuration menu - View commit details
-
Copy full SHA for 2f240fd - Browse repository at this point
Copy the full SHA 2f240fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b5ec4f - Browse repository at this point
Copy the full SHA 4b5ec4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 945f398 - Browse repository at this point
Copy the full SHA 945f398View commit details