thread/Thread: use BoundMethod
This commit is contained in:
@@ -26,13 +26,10 @@
|
||||
#endif
|
||||
|
||||
void
|
||||
Thread::Start(void (*_f)(void *ctx), void *_ctx)
|
||||
Thread::Start()
|
||||
{
|
||||
assert(!IsDefined());
|
||||
|
||||
f = _f;
|
||||
ctx = _ctx;
|
||||
|
||||
#ifdef WIN32
|
||||
handle = ::CreateThread(nullptr, 0, ThreadProc, this, 0, &id);
|
||||
if (handle == nullptr)
|
||||
@@ -87,7 +84,7 @@ Thread::Run()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
f(ctx);
|
||||
f();
|
||||
|
||||
#ifdef ANDROID
|
||||
Java::DetachCurrentThread();
|
||||
|
Reference in New Issue
Block a user