From 57b8255386ba5a722a6c74d23647a289d84b041f Mon Sep 17 00:00:00 2001 From: Jay Chia Date: Sun, 1 Oct 2023 14:44:27 -0700 Subject: [PATCH] Add multithreaded_io kwarg --- src/daft-io/src/python.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/daft-io/src/python.rs b/src/daft-io/src/python.rs index a7affa9840..33b399ae8e 100644 --- a/src/daft-io/src/python.rs +++ b/src/daft-io/src/python.rs @@ -18,12 +18,17 @@ mod py { fn io_glob( py: Python, path: String, + multithreaded_io: Option, io_config: Option, ) -> PyResult<&PyList> { + let multithreaded_io = multithreaded_io.unwrap_or(true); let lsr: DaftResult> = py.allow_threads(|| { - let io_client = get_io_client(true, io_config.unwrap_or_default().config.into())?; + let io_client = get_io_client( + multithreaded_io, + io_config.unwrap_or_default().config.into(), + )?; let (scheme, path) = parse_url(&path)?; - let runtime_handle = get_runtime(true)?; + let runtime_handle = get_runtime(multithreaded_io)?; let _rt_guard = runtime_handle.enter(); runtime_handle.block_on(async move {