orz1994
V2EX  ›  问与答

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

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

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

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