Browse Source

[doc] notice about `haxe.Timer` for threaded targets (#10577)

Aleksandr Kuzmenko 3 years ago
parent
commit
d3306f4738
1 changed files with 5 additions and 0 deletions
  1. 5 0
      std/haxe/Timer.hx

+ 5 - 0
std/haxe/Timer.hx

@@ -40,6 +40,11 @@ import sys.thread.EventLoop;
 
 	It is also possible to extend this class and override its `run()` method in
 	the child class.
+
+	Notice for threaded targets:
+	`Timer` instances require threads they were created in to run with Haxe's event loops.
+	Main thread of a Haxe program always contains an event loop. For other cases use 
+	`sys.thread.Thread.createWithEventLoop` and `sys.thread.Thread.runWithEventLoop` methods.
 **/
 class Timer {
 	#if (flash || js)