File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,14 @@ namespace hx
1212 {
1313 struct Thread_obj : public hx ::Object
1414 {
15- static Thread create (Callable<void (void )> job);
15+ using CreateFunction =
16+ #if (HXCPP_API_LEVEL >= 500)
17+ Callable<void (void )>;
18+ #else
19+ Dynamic;
20+ #endif
21+
22+ static Thread create (CreateFunction);
1623 static Thread current ();
1724 static int id ();
1825
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace
3636
3737 std::atomic_int nextThreadnumber (0 );
3838
39- void run (hx::thread::ThreadImpl thread, hx::Callable< void ( void )> job, hx::thread::CountingSemaphore semaphore)
39+ void run (hx::thread::ThreadImpl thread, hx::thread::Thread_obj::CreateFunction job, hx::thread::CountingSemaphore semaphore)
4040 {
4141 // info[1] will the the "top of stack" - values under this
4242 // (ie info[0] and other stack values) will be in the GC conservative range
@@ -59,7 +59,7 @@ namespace
5959 }
6060}
6161
62- hx::thread::Thread hx::thread::Thread_obj::create (Callable< void ( void )> job)
62+ hx::thread::Thread hx::thread::Thread_obj::create (CreateFunction job)
6363{
6464#ifdef EMSCRIPTEN
6565 return hx::Throw (HX_CSTRING (" Threads are not supported on Emscripten" ));
You can’t perform that action at this time.
0 commit comments