From 3e09bcfad213ba5a892d4011a28c95808a04adc1 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Sun, 21 Jan 2024 20:20:59 +0100 Subject: [PATCH] also stop turtle main loop on exit --- src/kernel/KernelEvents.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/KernelEvents.hx b/src/kernel/KernelEvents.hx index 6c10a13..ef4534e 100644 --- a/src/kernel/KernelEvents.hx +++ b/src/kernel/KernelEvents.hx @@ -154,7 +154,7 @@ class KernelEvents { private static function turtleLoop() { startTurtleCoroutine(); - while (true) { + while (!stopLoop) { var eventData = pullEvents(); if (eventData[1] == "turtle_response" || eventData[1] == "tthread") {