-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Async updates and queries in 3.0 #487
Comments
Here's another way to do things, which is currently in the three branch:
This is more like I advocate above. |
Hello @ccgus, I'm answering a request for async access to the database in groue/GRDB.swift#76. In my defense of synchronous accesses, among other arguments, I had to point that your FMDB has been synchronous for years. I have nothing against asynchronous accesses, of course, but I was wondering why you were adding async methods in FMDB 3. |
I'm adding it because folks keep on asking for it. |
Thanks for the explanation 😄 I won't feel too bad resisting a little, since I have much less pressure than you do ;-) |
So, here's the official discussion for doing async stuff in FMDB 3.
There's a couple of ways to do this. The easiest is to add async operations to FMDatabaseQueue, similar to: #469
I'm all for this.
I've also experimented a little bit with adding async stuff directly to FMDatabase. And after using it for a little bit, I think while it's neat, it's probably the wrong way to do things.
For the heck of it, here's what it kind of looks like at the moment:
The text was updated successfully, but these errors were encountered: