1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Add minetest.get_mapgen_object to API

This commit is contained in:
kwolekr 2013-06-26 17:19:39 -04:00
parent 2c0b51795e
commit 8aa930f28e
14 changed files with 188 additions and 9 deletions

View file

@ -47,6 +47,7 @@ public:
virtual void *Thread() = 0;
bool IsRunning();
void *GetReturnValue();
bool IsSameThread();
protected:
void ThreadStarted();
private:

View file

@ -148,6 +148,11 @@ void *JThread::GetReturnValue()
return val;
}
bool JThread::IsSameThread()
{
return pthread_equal(pthread_self(), threadid);
}
void *JThread::TheThread(void *param)
{
JThread *jthread;

View file

@ -141,6 +141,11 @@ void *JThread::GetReturnValue()
return val;
}
bool JThread::IsSameThread()
{
return GetCurrentThreadId() == threadid;
}
#ifndef _WIN32_WCE
UINT __stdcall JThread::TheThread(void *param)
#else