We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent daf94e3 commit 9537ebaCopy full SHA for 9537eba
src/lib.rs
@@ -4,13 +4,13 @@ use pyo3::exceptions::PyValueError;
4
use pyo3::prelude::*;
5
use pyo3::types::{PyList, PyTuple};
6
use std::cell::{OnceCell, RefCell};
7
-use std::sync::Arc;
+use std::sync::{Arc, OnceLock};
8
use tokio::runtime::{Handle, Runtime};
9
10
const LEGACY_TRANSACTION_CONTROL: i32 = -1;
11
12
fn rt() -> Handle {
13
- const RT: OnceCell<Runtime> = OnceCell::new();
+ static RT: OnceLock<Runtime> = OnceLock::new();
14
15
RT.get_or_init(|| {
16
tokio::runtime::Builder::new_multi_thread()
0 commit comments