Skip to content

Commit 9537eba

Browse files
committed
switch to oncelock
1 parent daf94e3 commit 9537eba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ use pyo3::exceptions::PyValueError;
44
use pyo3::prelude::*;
55
use pyo3::types::{PyList, PyTuple};
66
use std::cell::{OnceCell, RefCell};
7-
use std::sync::Arc;
7+
use std::sync::{Arc, OnceLock};
88
use tokio::runtime::{Handle, Runtime};
99

1010
const LEGACY_TRANSACTION_CONTROL: i32 = -1;
1111

1212
fn rt() -> Handle {
13-
const RT: OnceCell<Runtime> = OnceCell::new();
13+
static RT: OnceLock<Runtime> = OnceLock::new();
1414

1515
RT.get_or_init(|| {
1616
tokio::runtime::Builder::new_multi_thread()

0 commit comments

Comments
 (0)