mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Optimize check_signals
This commit is contained in:
@@ -111,9 +111,10 @@ pub fn check_signals(vm: &VirtualMachine) -> PyResult<()> {
|
||||
None => return Ok(()),
|
||||
};
|
||||
|
||||
if !ANY_TRIGGERED.swap(false, Ordering::Relaxed) {
|
||||
if !ANY_TRIGGERED.load(Ordering::Relaxed) {
|
||||
return Ok(());
|
||||
}
|
||||
ANY_TRIGGERED.store(false, Ordering::Relaxed);
|
||||
|
||||
trigger_signals(&signal_handlers.borrow(), vm)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user