add todo reminder to ditch pyo3 ffi because of lack subinterpreter support
This commit is contained in:
parent
b224c8fa7b
commit
ad61490cb5
1 changed files with 1 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
use pyo3::prelude::*;
|
use pyo3::prelude::*;
|
||||||
use tokio::task::{spawn_blocking, JoinError};
|
use tokio::task::{spawn_blocking, JoinError};
|
||||||
|
|
||||||
|
// TODO: Switch to Command::new for true multithreading and async
|
||||||
pub async fn download_url(url: String) -> Result<bool, JoinError> {
|
pub async fn download_url(url: String) -> Result<bool, JoinError> {
|
||||||
spawn_blocking(move || {
|
spawn_blocking(move || {
|
||||||
let res: PyResult<()> = Python::with_gil(|py| {
|
let res: PyResult<()> = Python::with_gil(|py| {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue