#143 Interruptible statistics code

Birleştirildi
jens.klein SPIN/master 6 yıl önce içindeki stefan.schmidt/stat_interrupt işlemelerini 1 ile birleştirdi
Stefan Schmidt 6 yıl önce olarak yorumlandı

This makes the statistics calculation code interruptible by CTRL+C by checking PyErr_CheckSignals() in all parts of the code that have the potential to take a significant amount of time, and, if it returns true, throwing py::error_already_set(). This is catched by pybind and makes Python see the "KeyboardInterrupt" exception.

In the main loop, PyErr_CheckSignals() is only checked once per second to minimize the performance impact, resulting in no measurable increase in runtime on my system.

This makes the statistics calculation code interruptible by CTRL+C by checking PyErr_CheckSignals() in all parts of the code that have the potential to take a significant amount of time, and, if it returns true, throwing py::error_already_set(). This is catched by pybind and makes Python see the "KeyboardInterrupt" exception. In the main loop, PyErr_CheckSignals() is only checked once per second to minimize the performance impact, resulting in no measurable increase in runtime on my system.
Bu değişiklik isteği başarıyla birleştirildi!
Giriş yap bu konuşmaya katılmak için.
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.