Просмотр исходного кода

Update `EventLoop` documentation. (#10721)

* Fix function name in documentation.

`promiseEvent()` doesn't exist.

* Tweak documentation wording.
player-03 3 лет назад
Родитель
Сommit
2fd3f276a7
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      std/sys/thread/EventLoop.hx

+ 5 - 5
std/sys/thread/EventLoop.hx

@@ -104,8 +104,8 @@ class EventLoop {
 
 	/**
 		Notify this loop about an upcoming event.
-		This makes the thread to stay alive and wait for as many events as many times
-		`.promise()` was called. These events should be added via `.runPromised()`
+		This makes the thread stay alive and wait for as many events as the number of
+		times `.promise()` was called. These events should be added via `.runPromised()`.
 	**/
 	public function promise():Void {
 		mutex.acquire();
@@ -170,8 +170,8 @@ class EventLoop {
 
 	/**
 		Execute all pending events.
-		Wait and execute as many events as many times `promiseEvent()` was called.
-		Runs until all repeating events are cancelled and no more events is expected.
+		Wait and execute as many events as the number of times `promise()` was called.
+		Runs until all repeating events are cancelled and no more events are expected.
 
 		Depending on a target platform this method may be non-reentrant. It must
 		not be called from event callbacks.
@@ -288,4 +288,4 @@ private class RegularEvent {
 		this.nextRunTime = nextRunTime;
 		this.interval = interval;
 	}
-}
+}