shyjsarah opened a new issue, #872: URL: https://github.com/apache/paimon-rust/issues/872
### Problem `block_on_with_runtime` detects when it is called from an entered Tokio runtime, but currently runs the future on the process fallback runtime in a new OS thread and synchronously joins that thread. Moving the future to a different runtime can stall work that depends on the active runtime. It also differs from the behavior of `runtime()` and `await_with_runtime`, which preserve an entered runtime. ### Expected behavior When called from a Tokio multi-thread runtime, the blocking helper should execute the future on that runtime while marking the blocking section so Tokio can continue scheduling work. Calls made without an entered runtime should continue to use the process fallback runtime. The current-thread runtime needs to retain a compatible fallback because `block_in_place` is not supported there. ### Reproduction A unit test can enter a multi-thread runtime, call `block_on_with_runtime` with a future that returns `Handle::current().id()`, and compare that value with the caller's runtime ID. The current implementation returns a different ID. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
