From 536ea2189ae1ff8bf05583ed03fac86797616ac9 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 17 Feb 2011 14:31:21 -0500 Subject: Split db_mysql_live into two modules so other modules can make use of the asynchronous command interface --- src/threadengines/threadengine_pthread.cpp | 7 +++++++ src/threadengines/threadengine_win32.cpp | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'src/threadengines') diff --git a/src/threadengines/threadengine_pthread.cpp b/src/threadengines/threadengine_pthread.cpp index acdccfeb5..e8242bb82 100644 --- a/src/threadengines/threadengine_pthread.cpp +++ b/src/threadengines/threadengine_pthread.cpp @@ -39,6 +39,13 @@ void Thread::Join() pthread_join(Handle, NULL); } +/** Exit the thread. Note that the thread still must be joined to free resources! + */ +void Thread::Exit() +{ + pthread_exit(0); +} + /** Start a new thread * @param thread A pointer to a newley allocated thread */ diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index e6ad725bf..218f711c4 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -31,6 +31,13 @@ void Thread::Join() WaitForSingleObject(Handle, INFINITE); } +/** Exit the thread. Note that the thread still must be joined to free resources! + */ +void Thread::Exit() +{ + ExitThread(0); +} + /** Start a new thread * @param thread A pointer to a newley allocated thread */ -- cgit