Skip to content

Commit cfc3c40

Browse files
committed
fix: ensure 'static lifetime for futures in wait_for_future function
1 parent 81e4204 commit cfc3c40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ pub(crate) fn get_global_ctx() -> &'static SessionContext {
5252
/// Utility to collect rust futures with GIL released and interrupt support
5353
pub fn wait_for_future<F>(py: Python, f: F) -> PyResult<F::Output>
5454
where
55-
F: Future + Send,
56-
F::Output: Send,
55+
F: Future + Send + 'static,
56+
F::Output: Send + 'static,
5757
{
5858
let runtime: &Runtime = &get_tokio_runtime().0;
5959

0 commit comments

Comments
 (0)