A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/async__task_8hpp_source.html below:

NCBI C++ ToolKit: src/app/grid/remote_app/async_task.hpp Source File

1 #ifndef __REMOTE_APP_ASYNC_TASK__HPP 2 #define __REMOTE_APP_ASYNC_TASK__HPP 40 template

<

class

TTask>

49

:

sleep

(s > 1 ? s : 1),

67  typedef

list<pair<int, TTask>>

TTasks

;

155 template

<

class

TTask>

160  tasks

.emplace_back(0, task);

168 template

<

class

TTask>

172  auto

backlog_end = backlog.end();

175  if

(!FillBacklog(backlog_end)) {

180  auto

it = backlog.begin();

181  while

(it != backlog_end) {

182  if

(it->second(++it->first, max_attempts)) {

191 template

<

class

TTask>

198  if

(!tasks.empty()) {

200

backlog_end = backlog.begin();

201

backlog.splice(backlog_end, tasks);

205

}

else if

(backlog.empty()) {

206  while

(!cond.WaitForSignal(lock));

209

}

else if

(!cond.WaitForSignal(lock, sleep)) {

216 template

<

class

TTask>

bool SchedulerImpl(TTask)

TTasks::iterator TTasks_I

list< pair< int, TTask > > TTasks

bool FillBacklog(TTasks_I &)

CExecutor(CContext &context, string thread_name)

CScheduler(CContext &context)

bool operator()(TTask task)

CScheduler & GetScheduler()

CAsyncTaskProcessor(int sleep, int max_attempts, string thread_name)

#define STD_CATCH_ALL(message)

Standard handling of "exception"-derived exceptions; catches non-standard exceptions and generates "u...

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

bool Run(TRunMode flags=fRunDefault)

Run the thread.

void SignalSome(void)

Wake at least one of the threads that are currently waiting on this condition variable (if any thread...

bool Discard(void)

If the thread has not been Run() yet, then schedule the thread object for destruction,...

static void SetCurrentThreadName(const CTempString &)

Set name for the current thread.

void Join(void **exit_data=0)

Wait for the thread termination.

Multi-threading – mutexes; rw-locks; semaphore.

Multi-threading – classes, functions, and features.

const string m_ThreadName

void * Main(void)

Derived (user-created) class must provide a real thread function.

SThread(CContext &context, string thread_name)

static CS_CONTEXT * context


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