Made NzThread interface mimic std::thread one
Hopefully fixed the threaded window bug Former-commit-id: 6dc3ca2a8bee1da591a9b97d202d4b73b10be8eb
This commit is contained in:
@@ -10,29 +10,24 @@
|
||||
#define NAZARA_THREADIMPL_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Thread.hpp>
|
||||
#include <windows.h>
|
||||
|
||||
class NzThread;
|
||||
struct NzFunctor;
|
||||
|
||||
class NzThreadImpl
|
||||
{
|
||||
friend class NzThread::Id;
|
||||
|
||||
public:
|
||||
NzThreadImpl(NzThread* threadFunc);
|
||||
~NzThreadImpl();
|
||||
NzThreadImpl(NzFunctor* threadFunc);
|
||||
|
||||
NzThread::Id GetId() const;
|
||||
bool IsCurrent() const;
|
||||
void Detach();
|
||||
void Join();
|
||||
void Terminate();
|
||||
|
||||
static void Sleep(nzUInt32 time);
|
||||
|
||||
private:
|
||||
static unsigned int __stdcall ThreadProc(void* userdata);
|
||||
|
||||
HANDLE m_thread;
|
||||
unsigned int m_threadId;
|
||||
HANDLE m_handle;
|
||||
};
|
||||
|
||||
#endif // NAZARA_THREADIMPL_HPP
|
||||
|
||||
Reference in New Issue
Block a user