File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,13 @@ where
6565 F :: Output : Send + ' static ,
6666{
6767 let ( runtime, _enter_guard) = get_and_enter_tokio_runtime ( ) ;
68- // Define the interval for checking Python signals
69- const SIGNAL_CHECK_INTERVAL_MS : u64 = 1000 ;
68+ // Define the milisecond interval for checking Python signals
69+ const SIGNAL_CHECK_INTERVAL : Duration = Duration :: from_millis ( 1_000 ) ;
7070
7171 // Release the GIL and directly block on the future with periodic signal checks
7272 py. allow_threads ( || {
7373 runtime. block_on ( async {
74- let mut interval =
75- tokio:: time:: interval ( Duration :: from_millis ( SIGNAL_CHECK_INTERVAL_MS ) ) ;
74+ let mut interval = tokio:: time:: interval ( SIGNAL_CHECK_INTERVAL ) ;
7675
7776 // tokio::pin!(f) ensures we can select! between the future
7877 // and interval.tick() without moving f.
You can’t perform that action at this time.
0 commit comments