コード例 #1
0
void win32_exception::install_handler() 
{
//#ifndef _DEBUG
	//_set_se_translator(win32_exception::Handler);
	installed_for_thread() = true;
//#endif
}
コード例 #2
0
ファイル: win32_exception.cpp プロジェクト: jaskie/Server
void win32_exception::ensure_handler_installed_for_thread(
		const char* thread_description)
{
	if (!installed_for_thread())
	{
		install_handler();

		if (thread_description)
			detail::SetThreadName(GetCurrentThreadId(), thread_description);
	}
}
コード例 #3
0
void win32_exception::ensure_handler_installed_for_thread(const char* thread_description)
{
	if (!installed_for_thread())
	{
		install_handler();

		if (thread_description)
		{
			std::string threadId = boost::lexical_cast<std::string>(boost::this_thread::get_id());
			unsigned long threadNumber = 0;
			sscanf(threadId.c_str(), "%lx", &threadNumber);

			//detail::SetThreadName(GetCurrentThreadId(), thread_description);   windows version of the func
			detail::SetThreadName(threadNumber, thread_description);
			get_thread_info().name = thread_description;
		}
	}
}