1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Testing of the automatic TSD deallocation logic. The sqlite3_thread_cleanup()

API is documented.  This should close ticket #1601. (CVS 2920)

FossilOrigin-Name: fb518b0ce4ddd4aaca5cccf61e651f173e735119
This commit is contained in:
drh
2006-01-11 23:40:33 +00:00
parent 6f7adc8a80
commit b4bc7057e5
10 changed files with 171 additions and 84 deletions

View File

@@ -332,6 +332,7 @@ int sqlite3_client_close(sqlite3 *pDb){
void *sqlite3_server(void *NotUsed){
sqlite3_enable_shared_cache(1);
if( pthread_mutex_trylock(&g.serverMutex) ){
sqlite3_enable_shared_cache(0);
return 0; /* Another server is already running */
}
while( !g.serverHalt ){
@@ -393,6 +394,7 @@ void *sqlite3_server(void *NotUsed){
pthread_cond_signal(&pMsg->clientWakeup);
}
pthread_mutex_unlock(&g.serverMutex);
sqlite3_thread_cleanup();
return 0;
}