-
Notifications
You must be signed in to change notification settings - Fork 298
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
Add queue method to CBLDatabase to run Asynchronous workloads #21
Comments
The danger of this is that it'd be really easy to misuse. The block has to use the CBL objects running on the background/server thread, not the ones being used by the main code. For example, this would be bad news:
because it'd be calling
but you only need to screw up once and use |
Added a |
This solved my problem exactly. The CBL_Server code isn't hard to duplicate and I could have compiled a modified version from source. However, I think it's important to be able to run async workloads without having to spawn another thread or run a modified version of the official repository. Thanks! |
Currently, you need to create a queue or a thread of your own to run CBL workloads in the background. CBL_Server has a queue method which allows you to perform asynchronous workloads. To solve this problem and keep CBL_Server private, add a queue method to CBLDatabase which then accesses it's private manager and server to queue the block of work.
The text was updated successfully, but these errors were encountered: