From 5004f31575c52b59e1fc654dfa08336a692afeee Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 2 Dec 2013 22:21:58 +0100 Subject: Fix broken async locking in release build --- src/script/lua_api/l_async_events.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'src/script/lua_api') diff --git a/src/script/lua_api/l_async_events.h b/src/script/lua_api/l_async_events.h index c33f3a962..9d42b07cf 100644 --- a/src/script/lua_api/l_async_events.h +++ b/src/script/lua_api/l_async_events.h @@ -17,23 +17,12 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef C_ASYNC_EVENTS_H_ -#define C_ASYNC_EVENTS_H_ +#ifndef L_ASYNC_EVENTS_H_ +#define L_ASYNC_EVENTS_H_ #include #include -#ifndef _WIN32 -#include -#else -#define _WINSOCKAPI_ -#include -static unsigned sleep(unsigned seconds) { - Sleep(seconds * 1000); - return 0; -} -#endif - /******************************************************************************/ /* Includes */ /******************************************************************************/ @@ -93,15 +82,6 @@ public: return worker_thread_wrapper(this); } - /** - * wait for thread to stop - */ - void Wait() { - while(IsRunning()) { - sleep(1); - } - } - private: /** * helper function to run a lua script @@ -237,4 +217,4 @@ private: JSemaphore m_JobQueueCounter; }; -#endif /* C_ASYNC_EVENTS_H_ */ +#endif /* L_ASYNC_EVENTS_H_ */ -- cgit v1.2.3