File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,12 @@ void* AsyncWorkerThread::Thread()
262
262
abort ();
263
263
}
264
264
265
+ lua_getglobal (L, " core" );
266
+ if (lua_isnil (L, -1 )) {
267
+ errorstream << " Unable to find core within async environment!" ;
268
+ abort ();
269
+ }
270
+
265
271
// Main loop
266
272
while (!StopRequested ()) {
267
273
// Wait for job
@@ -271,12 +277,6 @@ void* AsyncWorkerThread::Thread()
271
277
continue ;
272
278
}
273
279
274
- lua_getglobal (L, " core" );
275
- if (lua_isnil (L, -1 )) {
276
- errorstream << " Unable to find core within async environment!" ;
277
- abort ();
278
- }
279
-
280
280
lua_getfield (L, -1 , " job_processor" );
281
281
if (lua_isnil (L, -1 )) {
282
282
errorstream << " Unable to get async job processor!" << std::endl;
@@ -303,13 +303,16 @@ void* AsyncWorkerThread::Thread()
303
303
toProcess.serializedResult = std::string (retval, length);
304
304
}
305
305
306
- // Pop core, job_processor, and retval
307
- lua_pop (L, 3 );
306
+ lua_pop (L, 1 ); // Pop retval
308
307
309
308
// Put job result
310
309
jobDispatcher->putJobResult (toProcess);
311
310
}
311
+
312
+ lua_pop (L, 1 ); // Pop core
313
+
312
314
log_deregister_thread ();
315
+
313
316
return 0 ;
314
317
}
315
318
You can’t perform that action at this time.
0 commit comments