Going back to 2-4 threads

This commit is contained in:
Strahinja Val Markovic 2012-05-11 10:09:52 -07:00
parent 6e1c7f8429
commit a8e9b61f3f

View File

@ -39,8 +39,8 @@ namespace YouCompleteMe
namespace namespace
{ {
const unsigned int MAX_ASYNC_THREADS = 1; const unsigned int MAX_ASYNC_THREADS = 4;
const unsigned int MIN_ASYNC_THREADS = 1; const unsigned int MIN_ASYNC_THREADS = 2;
void ThreadMain( TaskStack &task_stack ) void ThreadMain( TaskStack &task_stack )
{ {
@ -161,9 +161,9 @@ Future Completer::CandidatesForQueryAndTypeAsync(
shared_ptr< packaged_task< AsyncResults > > task = shared_ptr< packaged_task< AsyncResults > > task =
make_shared< packaged_task< AsyncResults > >( make_shared< packaged_task< AsyncResults > >(
bind( &Completer::ResultsForQueryAndType, bind( &Completer::ResultsForQueryAndType,
boost::cref( *this ), boost::cref( *this ),
query, query,
filetype ) ); filetype ) );
unique_future< AsyncResults > future = task->get_future(); unique_future< AsyncResults > future = task->get_future();