Error messages
This commit is contained in:
parent
d7659ea8c1
commit
91d10a7d51
2 changed files with 8 additions and 4 deletions
|
@ -321,8 +321,9 @@ DRIVER_INIT(bdberl_drv)
|
||||||
// cleanup and set the environment to zero. Attempts to open ports will
|
// cleanup and set the environment to zero. Attempts to open ports will
|
||||||
// fail and the user will have to sort out how to resolve the issue.
|
// fail and the user will have to sort out how to resolve the issue.
|
||||||
DBG("G_DB_ENV->close(%p, 0);", &G_DB_ENV);
|
DBG("G_DB_ENV->close(%p, 0);", &G_DB_ENV);
|
||||||
G_DB_ENV->close(G_DB_ENV, 0);
|
G_DB_ENV_ERROR = G_DB_ENV->close(G_DB_ENV, 0);
|
||||||
G_DB_ENV = 0;
|
G_DB_ENV = 0;
|
||||||
|
DBG(" = %d\n", G_DB_ENV_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,10 +64,13 @@ TPool* bdberl_tpool_start(unsigned int thread_count)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < thread_count; i++)
|
for (i = 0; i < thread_count; i++)
|
||||||
{
|
{
|
||||||
|
int rc = erl_drv_thread_create("bdberl_tpool_thread", &(tpool->threads[i]), &bdberl_tpool_main, (void*)tpool, 0);
|
||||||
|
if (0 != rc) {
|
||||||
// TODO: Figure out good way to deal with errors in this situation (should be rare, but still...)
|
// TODO: Figure out good way to deal with errors in this situation (should be rare, but still...)
|
||||||
erl_drv_thread_create("bdberl_tpool_thread", &(tpool->threads[i]), &bdberl_tpool_main, (void*)tpool, 0);
|
fprintf(stderr, "Failed to spawn an erlang thread for the BDB thread pools! %s\n", erl_errno_id(rc));
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tpool;
|
return tpool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue