]> git.lizzy.rs Git - lua_async.git/commitdiff
Fix mistake in setImmediate documentation
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 6 Aug 2021 18:36:08 +0000 (20:36 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 6 Aug 2021 18:36:08 +0000 (20:36 +0200)
README.md

index 6c1218a691d641a3b9a24b5671536edd84844170..75a7d28168d2e169af4647104d4cf1b9fabdc0b4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ This function takes an ID of an existing interval and removes it, meaning it wil
 Immediates are processed every step after timeouts and intervals have been processed. An immediated is executed only once.
 
 #### `id = setImmediate(callback, [...])`
-Registers a new interval that will execute once in the current or the next step, depending on when it is registered. If an immediate is registered while immediates are processing, it will be executed in the next step. However, if an interval is registered by a timeout or interval callback, the immediate _will_ process in the same step in which it was registered. `...` are the arguments passed to the `callback` function that is called when the immediate executes. `setImmediate` returns an unique numeric immediate ID that can be passed to `clearImmediate`. If `callback` is not a function, an error is raised when the immediate is executed.
+Registers a new immediate that will execute once in the current or the next step, depending on when it is registered. If an immediate is registered while immediates are processing, it will be executed in the next step. However, if an immediate is registered by a timeout or interval callback, the immediate _will_ process in the same step in which it was registered. `...` are the arguments passed to the `callback` function that is called when the immediate executes. `setImmediate` returns an unique numeric immediate ID that can be passed to `clearImmediate`. If `callback` is not a function, an error is raised when the immediate is executed.
 
 #### `clearImmediate(id)`
 This function takes an ID of an existing immediate and cancels it, meaning it will not execute. If `id` is not numeric, not a valid immediate id or the associated immediate has already executed or been cleared, `clearImmediate` does nothing. `id` may however not be `nil`. `clearImmediate` may be called on any immediate at any time, if immediates are currently processing the cleared immediate is removed from the list of immediates to process.