orz1994
V2EX  ›  问与答

调用 threading.Timer()等待过程中能否接受到 SIGINT 信号后中断线程

  •  1
     
  •   orz1994 · Nov 14, 2018 · 1280 views
    This topic created in 2927 days ago, the information mentioned may be changed or developed.

    cron.d 出问题了只能手写一个定时器,有没有什么方法能让 threading.Timer()等待过程中能接受到 ctrlC 或 ctrlZ 的信号然后终止掉该线程?

    orz1994
    orz1994
    OP
    Nov 14, 2018
    1
    是不是忘选主题了,备注 python
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2207 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 14:21 · PVG 22:21 · LAX 06:21 · JFK 09:21
    ♥ Do have faith in what you're doing.