File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ impl Runtime {
160160 }
161161
162162 /// Advance the JS event loop by a single tick
163- /// See [`Runtime::await_event_loop `] for fully running the event loop
163+ /// See [`Runtime::block_on_event_loop `] for fully running the event loop
164164 ///
165165 /// Returns true if the event loop has pending work, or false if it has completed
166166 ///
@@ -173,6 +173,21 @@ impl Runtime {
173173 self . block_on ( |runtime| async move { runtime. inner . advance_event_loop ( options) . await } )
174174 }
175175
176+ /// Advance the JS event loop by a single tick
177+ /// See [`Runtime::await_event_loop`] for fully running the event loop
178+ ///
179+ /// Returns a future that resolves true if the event loop has pending work, or false if it
180+ /// has completed
181+ ///
182+ /// # Arguments
183+ /// * `options` - Options for the event loop polling, see [`deno_core::PollEventLoopOptions`]
184+ ///
185+ /// # Errors
186+ /// Can fail if a runtime error occurs during the event loop's execution
187+ pub async fn advance_event_loop_async ( & mut self , options : PollEventLoopOptions ) -> Result < bool , Error > {
188+ self . inner . advance_event_loop ( options) . await
189+ }
190+
176191 /// Run the JS event loop to completion, or until a timeout is reached
177192 /// Required when using the `_immediate` variants of functions
178193 ///
You can’t perform that action at this time.
0 commit comments