Skip to content
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

Allow parallel execution of node event loop and sqlite3 in Statement:Work_AfterAll #1514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/statement.cc
Expand Up @@ -579,8 +579,10 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {

if (stmt->status != SQLITE_DONE) {
Error(baton.get());
STATEMENT_END();
}
else {
STATEMENT_END();
// Fire callbacks.
Napi::Function cb = baton->callback.Value();
if (!cb.IsUndefined() && cb.IsFunction()) {
Expand All @@ -607,8 +609,6 @@ void Statement::Work_AfterAll(napi_env e, napi_status status, void* data) {
}
}
}

STATEMENT_END();
}

Napi::Value Statement::Each(const Napi::CallbackInfo& info) {
Expand Down