mirror of
https://github.com/discourse/discourse.git
synced 2025-01-09 00:34:43 +08:00
efa50a4da2
This commit introduces a new ThreadPool class that provides efficient worker thread management for background tasks. Key features include: - Dynamic scaling from min to max threads based on workload - Proper database connection management in multisite setup - Graceful shutdown with task completion - Robust error handling and logging - FIFO task processing with a managed queue - Configurable idle timeout for worker threads The implementation is thoroughly tested, including stress tests, error scenarios, and multisite compatibility. |
||
---|---|---|
.. | ||
defer_spec.rb | ||
thread_pool_spec.rb |