vector<SFormatResultValues>
results)
88 const intkVecSize=5000;
89vector<vector<SFormatResultValues>> results_v;
90results_v.resize(kVecSize);
97 for(std::map<
int, vector<SFormatResultValues>>::iterator itr=
m_ResultsMap.begin(); itr !=
m_ResultsMap.end(); itr++)
99 if(itr->first < currNum)
101 else if(itr->first > currNum)
104results_v[currNum%kVecSize].swap(itr->second);
109 for(
intindex=lastNum; index<currNum; ++index)
111 for(vector<SFormatResultValues>::iterator vecitr=results_v[index%kVecSize].begin();
112vecitr != results_v[index%kVecSize].end(); vecitr++)
115(*vecitr).formatter->PrintOneResultSet(**
result, (*vecitr).qVec);
117results_v[index%kVecSize].clear();
131 return(
void*)
NULL;
CFastMutex blastProcessGuard
void Finalize()
Close queue for printing. No calls to QueueResults allowed after this.
std::map< int, vector< SFormatResultValues > > m_ResultsMap
virtual void * Main(void)
Derived (user-created) class must provide a real thread function.
void Join()
Calls Finalize (if not already called) then CThread::Join(); Should only be called if QueueResults wi...
void QueueResults(int batchNumber, vector< SFormatResultValues > results)
Queue results for printing.
virtual ~CBlastAsyncFormatThread(void)
Search Results for All Queries.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
void Lock(void)
Acquire mutex for the current thread with no nesting checks.
void Wait(void)
Wait on semaphore.
void Post(unsigned int count=1)
Increment the semaphore by "count".
void Join(void **exit_data=0)
Wait for the thread termination.
void Unlock(void)
Release mutex with no owner or nesting checks.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4