--- id: threadloop version: "1.0.2" license: MIT license_treatment: permissive maintenance: abandoned --- # threadloop — Tornado IOLoop Backed Concurrent Futures License: permissive · Maintenance: abandoned · Downloads: 244.0K/mo ## What it is and what it does ThreadLoop wraps Tornado's IOLoop inside a background thread, letting you call Tornado coroutines from ordinary synchronous Python code and retrieve their results as futures. It bridges the gap between async Tornado code and synchronous callers by managing the event loop lifecycle automatically. The package was designed for scenarios where you have a Tornado-based library or service but need to call it from synchronous code without blocking the main thread. It uses a context manager to set up and tear down the IOLoop thread cleanly. However, the project is no longer maintained—the last release was in 2016 and the last commit in 2022—so it is not tested against modern versions of Tornado or Python. Use it for: - Call a Tornado-based async library from a synchronous script or application without rewriting the library. - Integrate Tornado coroutines into a legacy synchronous codebase that cannot be fully converted to async. - Test Tornado coroutines in a synchronous test suite without restructuring the test framework. - Prototype or debug Tornado code interactively in a synchronous Python shell or notebook. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Runs Tornado coroutines from synchronous Python code by wrapping an IOLoop in a thread, allowing you to call async functions and wait for their results. No, unless you are maintaining legacy code locked to Python 2.7 or early Python 3 with an old Tornado version. The package is abandoned, untested with modern Tornado, and offers no maintenance path forward. Modern alternatives—such as asyncio bridges, async/await patterns, or Tornado's own async support—are better choices for new code. ## Install pip install threadloop uv add threadloop poetry add threadloop ## Installing threadloop Before you install: Low install friction, but the package is abandoned—last release was 2016-04-01 and last commit 2022-05-17. No recent maintenance or updates; use only if your codebase is locked to older Tornado versions. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install threadloop from threadloop import ThreadLoop from tornado import gen @gen.coroutine def my_coroutine(): yield gen.sleep(1) raise gen.Return("done") with ThreadLoop() as loop: future = loop.submit(my_coroutine) print(future.result()) Requires Tornado; designed for Python 2.7 and early Python 3 versions (3.3–3.5 per classifiers). Compatibility with modern Tornado and Python versions is unverified. Verify before relying: - Whether this package works with modern Tornado versions (current or recent releases). - Whether it works reliably with Python 3.6+ or only the declared versions (3.3–3.5). - Whether the threading model is safe for production use or carries known race conditions. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 244.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tornado coroutines from sync code, run async tornado in threads, tornado ioloop wrapper, synchronous tornado interface, tornado concurrent futures, bridge tornado async to sync, tornado, async-bridge, abandoned [View on SkillFed](https://skillfed.io/packages/threadloop) · [View on PyPI](https://pypi.org/project/threadloop/)