You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your library is poorly written and definitely not lightweight because you create your own serial queue and perform all requests syncronously! Author of this lib doesn't understand multithreading and how things should be done.
You either leave synchronization for user so that he creates his own serial queue and decide if he want sync or async (and this is lightweight), or you create serial queue and make two versions for each function - sync and async.
Currently user will always block 2 threads, inner serial queue's thread and his own queue's thread that he uses not to block main one (or even main thread).
I would suggest to implement second approach not to break existing api.
The text was updated successfully, but these errors were encountered:
The point of the queue is not "effectiveness" but safety. And with SQLite most operations are so fast that you don't even need another queue/thread to avoid blocking the main thread. It's lightweight in the sense that the user does not have to deal with how the connection is accessed.
But yes, the whole thing could probably be rethought at some point.
Listen, nobody is forcing you to use this library. If you don't agree with the design, use something else, there are enough alternatives, or come up with something better yourself.
But it looks like you're not really interested in helping anyway.
Uh oh!
There was an error while loading. Please reload this page.
Your library is poorly written and definitely not lightweight because you create your own serial queue and perform all requests syncronously! Author of this lib doesn't understand multithreading and how things should be done.
You either leave synchronization for user so that he creates his own serial queue and decide if he want sync or async (and this is lightweight), or you create serial queue and make two versions for each function - sync and async.
Currently user will always block 2 threads, inner serial queue's thread and his own queue's thread that he uses not to block main one (or even main thread).
I would suggest to implement second approach not to break existing api.
The text was updated successfully, but these errors were encountered: