Explorar o código

wakeup after onAbort (prevent exit before print stack) + fix for hl debugger

Nicolas Cannasse hai 1 mes
pai
achega
efa61f2991
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      std/sys/thread/Thread.hx

+ 4 - 1
std/sys/thread/Thread.hx

@@ -149,15 +149,18 @@ class Thread {
 			currentTLS.value = t;
 			var exception = null;
 			try {
+				#if hl
+				hl.Api.setErrorHandler(null);
+				#end
 				job();
 				t.events.loop();
 			} catch( e ) {
 				exception = e;
 			}
 			t.dispose();
-			@:privateAccess main().events.wakeup();
 			if( exception != null )
 				t.onAbort(exception);
+			@:privateAccess main().events.wakeup();
 		});
 		return t;
 	}