aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_async_events.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-12-02 22:21:58 +0100
committerPerttu Ahola <celeron55@gmail.com>2013-12-03 17:50:00 +0200
commit5004f31575c52b59e1fc654dfa08336a692afeee (patch)
tree6b44e7a6a964ce372b968feba3688518a0647010 /src/script/lua_api/l_async_events.h
parent6cbd1b8bf739e0d776ee508708b5076b491fb638 (diff)
downloadminetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.gz
minetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.bz2
minetest-5004f31575c52b59e1fc654dfa08336a692afeee.zip
Fix broken async locking in release build
Diffstat (limited to 'src/script/lua_api/l_async_events.h')
-rw-r--r--src/script/lua_api/l_async_events.h26
1 files changed, 3 insertions, 23 deletions
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 <vector>
#include <map>
-#ifndef _WIN32
-#include <unistd.h>
-#else
-#define _WINSOCKAPI_
-#include <windows.h>
-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_ */