diff --git a/src/common/runtime/src/lib.rs b/src/common/runtime/src/lib.rs index 54e2555e61..2c8fc6acdd 100644 --- a/src/common/runtime/src/lib.rs +++ b/src/common/runtime/src/lib.rs @@ -100,7 +100,12 @@ impl Runtime { /// Spawns a task on the runtime and blocks the current thread until the task is completed. /// Similar to tokio's Runtime::block_on but requires static lifetime + Send - /// You should use this when you are spawning IO tasks from an Expression Evaluator or in the Executor + /// You should use this when you need to run an async task in a synchronous function, but you are already in a tokio runtime. + /// + /// For example, URL download is an async function, but it is called from a synchronous function in a tokio runtime, + /// i.e. calling the Expression Evaluator from the Native Executor. + /// + /// In the future, we should refactor the code to be fully async, but for now, this is a workaround. pub fn block_on(&self, future: F) -> DaftResult where F: Future + Send + 'static,