{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/7"}],"enrichment":{"capability":"Provides context managers and decorators to enforce timeouts on code blocks and function calls, and raise exceptions asynchronously in other threads.","skillfed_tags":["threading","timeout-control","abandoned"],"use_cases":["Enforce maximum execution time on web request handlers or API calls that might hang indefinitely.","Interrupt long-running computations or data processing tasks if they exceed a time budget.","Implement watchdog timers for background worker threads that may become stuck.","Decorate functions to return a default value if they do not complete within a specified timeout.","Control timeout behavior in test suites to fail tests that run longer than expected."],"what_it_does":"stopit provides two main mechanisms for controlling execution time in Python: context managers and decorators that enforce timeouts on code blocks and function calls. The core capability is raising asynchronous exceptions in other threads, including the main thread, to interrupt long-running operations. It offers ThreadingTimeout (a context manager) and threading_timeoutable (a decorator) for timeout control, plus async_raise for direct thread interruption. The package also provides a TimeoutException that signals when a timeout has occurred.\n\nThe package is tightly coupled to CPython's threading implementation and uses low-level APIs that are not available on alternative Python implementations. It has important limitations: it cannot interrupt blocking Python atomic instructions that hold the GIL (such as time.sleep), and signal-based timeout controls do not work on Windows. The package is no longer maintained, with its last release in 2018-02-09.","worth_installing":"No. The package is abandoned (last release 2018-02-09) with no maintenance signal. It relies on CPython-specific internals, does not work on alternative implementations, and has known limitations with GIL-blocking operations and Windows compatibility. For modern Python projects, consider maintained alternatives or the standard library's asyncio timeout mechanisms."},"id":"stopit","links":{"html":"https://skillfed.io/packages/stopit","md":"https://skillfed.io/packages/stopit.md","pypi":"https://pypi.org/project/stopit/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2018-02-09","license_spdx":null,"license_treatment":"permissive","name":"stopit","python_support":"unspecified","summary":"Timeout control decorator and context managers, raise any exception in another thread"},"popularity":{"monthly_downloads":233110,"position":9046,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.2"}
