#143 Interruptible statistics code

병합
jens.klein stefan.schmidt/stat_interrupt 에서 SPIN/master 로 1 commits 를 머지했습니다 6 년 전
Stefan Schmidt 코멘트됨, 6 년 전

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.
이 풀리퀘스트가 성공적으로 머지되었습니다!
로그인하여 이 대화에 참여
레이블 없음
Bug
마일스톤 없음
담당자 없음
참여자 1명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.