Browse Source

fixed test using EventLoop.addAsync

ncannasse 1 month ago
parent
commit
c1327d3c16
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/misc/eventLoop/Main.hx

+ 2 - 2
tests/misc/eventLoop/Main.hx

@@ -42,9 +42,9 @@ class Main {
 		#end
 		#end
 
 
 		haxe.EventLoop.addTask(function() {
 		haxe.EventLoop.addTask(function() {
-			var event : haxe.MainLoop.MainEvent = null;
+			var event = haxe.EventLoop.main.addAsync();
 			var count = 0;
 			var count = 0;
-			event = haxe.MainLoop.add(function() {
+			event.start(function() {
 				trace(String.fromCharCode("A".code + count++));
 				trace(String.fromCharCode("A".code + count++));
 				if( count == 5 ) event.stop();
 				if( count == 5 ) event.stop();
 			});
 			});