2014년 12월 4일 목요일

mongo c++ threaded with scopedDbConnection.

I got the following at program start:

mongo::ScopedDbConnection* c;

Then I launch a thread pool. Each thread should be able to upsert records based on a specific logic.
This program was not threaded before and was working OK. It was just too slow and that's why I'm making it threaded (Using async and futures)

Anyway, each thread has a function which does the following:

    c = mongo::ScopedDbConnection::getScopedDbConnection("127.0.0.1");

    mongo::BSONObj query;
    .... other BSON objects...



I replied in your other post which had more details.


댓글 없음:

댓글 쓰기