Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Debuggers

    interruptingcow 0.5

    Download button

    No screenshots available
    Downloads: 126  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Erik van Zijst | More programs
    MIT/X Consortium Lic... / FREE
    June 13th, 2012, 02:35 GMT
    ROOT / Programming / Debuggers

     Read user reviews (0)  Refer to a friend  Subscribe

    interruptingcow description

    A watchdog that interrupts long running code

    interruptingcow is a generic Python utility that can relatively gracefully interrupt your code when it doesn't execute within a specific number of seconds:

    from interruptingcow import timeout

    try:
     with timeout(5):
     # perform a potentially very slow operation
     pass
    except RuntimeError:
     print "didn't finish within 5 seconds"


    Installation

     pip install interruptingcow

    Caveats

    Interruptingcow uses signal(SIGALRM) to let the operating system interrupt program execution. This has the following limitations:

    1. Python signal handlers only apply to the main thread, so you cannot use this from other threads
    2. You must not use this in a program that uses SIGALRM itself


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    watchdog interrupt | Python debugger | Python | watchdog | interrupt

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM