Example #1
0
void ToolIPCPipeClient::start()
{
	startHelper();

	size_t x=0;

	do
	{
		try
		{
			tryStart();
			break;
		}
		catch (gcException)
		{
			if (x > 5)
			{
				throw;
			}
			else
			{
				gcSleep(500);
				x++;
			}
		}
	}
	while (true);
}
Example #2
0
void QThreadPoolPrivate::tryToStartMoreThreads()
{
    // try to push tasks on the queue to any available threads
    while (!queue.isEmpty() && tryStart(queue.first().first))
        queue.removeFirst();
}
void BoostConnectionServer::start() {
	boost::optional<Error> error = tryStart();
	if (error) {
		eventLoop->postEvent(boost::bind(boost::ref(onStopped), *error), shared_from_this());
	}
}