OP Posted at 21-09-2026, 03:01 AM
(This post was last modified: 21-09-2026, 03:26 AM by 0x5k1z0.)

[ Hidden Content! ]
Refactor the existing TorSearch concurrency system without changing unrelated functionality.
GoalMake multi-provider searching fast, responsive, and production-quality while keeping the PyQt6 UI completely non-blocking.
Requirements
- Use PyQt6 QThreadPool + QRunnable for background provider tasks.
- Never perform network, validation, Discord, or heavy file operations on the GUI thread.
- Run providers concurrently with a controlled thread pool.
- Add clean Qt signals for:
- provider started
- result received
- provider finished
- error
- progress
- provider started
- Centralize result processing through a thread-safe.Code:
ResultManager
- Normalize and deduplicate results before displaying them.
- Run LIVE/OFFLINE validation asynchronously after results appear.
- Add safe cancellation using aso stale results cannot enter a new search.Code:
search_id
- Add per-provider timeouts and bounded retries.
- Isolate provider failures so one failed provider never stops the others.
- Keep statistics accurate and thread-safe.
- Keep the existing UI, providers, result format, Discord integration, and project structure unless changes are genuinely required.
- Avoid unnecessary dependencies and avoid creating unlimited threads.
- Ensure clean worker shutdown when the application closes.
Code:
GUI → SearchController → QThreadPool → Providers → ResultManager → Signals → GUIAfter implementation, run a basic test with multiple providers, duplicates, timeout/error cases, cancellation, and application shutdown.
Not ratedThis leak has not been rated yet, be careful when downloading.


![[Image: kaNCklg.gif]](https://i.imgur.com/kaNCklg.gif)