File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ impl Runtime {
160
160
}
161
161
162
162
/// 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
164
164
///
165
165
/// Returns true if the event loop has pending work, or false if it has completed
166
166
///
@@ -173,6 +173,24 @@ impl Runtime {
173
173
self . block_on ( |runtime| async move { runtime. inner . advance_event_loop ( options) . await } )
174
174
}
175
175
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 (
188
+ & mut self ,
189
+ options : PollEventLoopOptions ,
190
+ ) -> Result < bool , Error > {
191
+ self . inner . advance_event_loop ( options) . await
192
+ }
193
+
176
194
/// Run the JS event loop to completion, or until a timeout is reached
177
195
/// Required when using the `_immediate` variants of functions
178
196
///
You can’t perform that action at this time.
0 commit comments