SwiftData icon indicating copy to clipboard operation
SwiftData copied to clipboard

Multiple threads

Open eriktelepovsky opened this issue 10 years ago • 1 comments

All SwiftData operations are placed on a custom serial queue ("SwiftData.DatabaseQueue") and executed in a FIFO order. Thats great, but is there a way I could set my own queue? Imagine following scenario: I am saving a lot of data in background thread, but I don't want to freeze main UI thread in which the data are fetching/selecting. It is happening because all SQL queries are executed in same serial queue. It would be great if I can write into database in one queue and read from database in another.

eriktelepovsky avatar Dec 02 '14 18:12 eriktelepovsky

I'm looking into the easiest way to implement this without generating a bunch of errors. I have to do some research on concurrency in SQLite ...

ryanfowler avatar Dec 09 '14 00:12 ryanfowler