/* each thread which does db operations has a Client object in TLS. call this when your thread starts. */ Client& Client::initThread(const char *desc, AbstractMessagingPort *mp) { #if defined(_DEBUG) { if( sizeof(void*) == 8 ) { StackChecker sc; sc.init(); } } #endif assert( currentClient.get() == 0 ); Client *c = new Client(desc, mp); currentClient.reset(c); mongo::lastError.initThread(); return *c; }
Client& Client::initThread(const char *desc, AbstractMessagingPort *mp) { #if defined(_DEBUG) { nThreads++; // never decremented. this is for casi class asserts if( sizeof(void*) == 8 ) { StackChecker sc; sc.init(); } } #endif verify( currentClient.get() == 0 ); Client *c = new Client(desc, mp); currentClient.reset(c); mongo::lastError.initThread(); return *c; }
/* each thread which does db operations has a Client object in TLS. call this when your thread starts. */ Client& Client::initThread(const char *desc, AbstractMessagingPort *mp) { #if defined(_DEBUG) { if( sizeof(void*) == 8 ) { StackChecker sc; sc.init(); } } #endif verify( currentClient.get() == 0 ); Client *c = new Client(desc, mp); currentClient.reset(c); mongo::lastError.initThread(); if (mp != NULL) { c->initializeAuthorizationManager(); } return *c; }