V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
orz1994
V2EX  ›  问与答

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

  •  1
     
  •   orz1994 · Nov 14, 2018 · 879 views
    This topic created in 2726 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   ·   2591 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 14:11 · PVG 22:11 · LAX 07:11 · JFK 10:11
    ♥ Do have faith in what you're doing.