| 158 } |
159 } |
| 159 |
160 |
| 160 /* ------------------- Job Control / Threadpool functions ------------------- */ |
161 /* ------------------- Job Control / Threadpool functions ------------------- */ |
| 161 |
162 |
| 162 void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd) { |
163 void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd) { |
| 163 |
164 UiThread *thread = [[UiThread alloc]init:obj jobfunc:tf jobdata:td]; |
| |
165 thread.finish_callback = f; |
| |
166 thread.finish_userdata = fd; |
| |
167 [thread start]; |
| 164 } |
168 } |
| 165 |
169 |
| 166 void ui_call_mainthread(ui_threadfunc tf, void* td) { |
170 void ui_call_mainthread(ui_threadfunc tf, void* td) { |
| 167 |
171 |
| 168 } |
172 } |