No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ThreadImpl.h 734B

123456789101112131415161718192021222324252627282930313233343536
  1. #pragma once
  2. #if IL2CPP_THREADS_STD
  3. #include "os/ErrorCodes.h"
  4. #include "os/Thread.h"
  5. #include "os/WaitStatus.h"
  6. #include "utils/NonCopyable.h"
  7. #include <thread>
  8. namespace il2cpp
  9. {
  10. namespace os
  11. {
  12. class ThreadImpl : public il2cpp::utils::NonCopyable
  13. {
  14. public:
  15. static void AllocateStaticData() {}
  16. static void FreeStaticData() {}
  17. ThreadImpl();
  18. ~ThreadImpl();
  19. uint64_t Id();
  20. ErrorCode Run(Thread::StartFunc func, void* arg, int64_t affinityMask);
  21. WaitStatus Join();
  22. WaitStatus Join(uint32_t ms);
  23. static WaitStatus Sleep(uint32_t milliseconds);
  24. static uint64_t CurrentThreadId();
  25. private:
  26. std::thread m_Thread;
  27. };
  28. }
  29. }
  30. #endif