)]}'
{"swift/common/threadpool.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"99626a5c8d69fa0f7e4c6bbdbfe51b401b40e04f","unresolved":true,"context_lines":[{"line_number":85,"context_line":"            self.put(item)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class Executor:"},{"line_number":89,"context_line":"    # No-op to be compatible with eventlet call"},{"line_number":90,"context_line":"    def set_num_threads(self, *args, **kwargs):"},{"line_number":91,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"8932775e_e07bc956","line":88,"updated":"2026-03-13 01:51:32.000000000","message":"We should probably include a docstring, if only to call out that all calls to `execute` will be run in the current thread.\n\nThat should also be prominent in any migration docs we might write -- I know there are auth middlewares that use (an inlining of) our old `ThreadPool` class. They\u0027ll do it for two reasons:\n\n1. To keep some compute-heavy workloads (like running scrypt with passwords) from jamming up the eventlet hub and\n2. To limit the overall number of compute-heavy workloads that a proxy may service -- don\u0027t want an auth DoS bringing down the whole proxy\n\nMoving to real threads eliminates 1, but not 2, so they definitely *shouldn\u0027t* be looking to swap to this.","commit_id":"c644e226f502b50cd07afa73eef037cb5df7b48c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"7ded645a8c2ff8a1e226bb80d5527e0456eb16e9","unresolved":true,"context_lines":[{"line_number":85,"context_line":"            self.put(item)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class Executor:"},{"line_number":89,"context_line":"    # No-op to be compatible with eventlet call"},{"line_number":90,"context_line":"    def set_num_threads(self, *args, **kwargs):"},{"line_number":91,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"cb9cec3c_5b66302c","line":88,"in_reply_to":"8932775e_e07bc956","updated":"2026-03-13 10:48:20.000000000","message":"Will add a docstring in the next patchset.\n\nThat said, do you think it might more sense to use a real threadpool?","commit_id":"c644e226f502b50cd07afa73eef037cb5df7b48c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2d3965a4a3f8470bce27d2777d106e10c3459728","unresolved":true,"context_lines":[{"line_number":85,"context_line":"            self.put(item)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class Executor:"},{"line_number":89,"context_line":"    # No-op to be compatible with eventlet call"},{"line_number":90,"context_line":"    def set_num_threads(self, *args, **kwargs):"},{"line_number":91,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"f2bede54_4af823ed","line":88,"in_reply_to":"cb9cec3c_5b66302c","updated":"2026-03-13 15:37:24.000000000","message":"Within swift? I don\u0027t think so -- I guess there was a (per process) semaphore for number of concurrent disk accesses, but ops can get a similar effect with max_clients. Having it just pass through when we\u0027re not dealing with eventlet seems fine. (I think?)","commit_id":"c644e226f502b50cd07afa73eef037cb5df7b48c"}],"test/unit/common/test_threadpool.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"99626a5c8d69fa0f7e4c6bbdbfe51b401b40e04f","unresolved":true,"context_lines":[{"line_number":108,"context_line":"        def fail():"},{"line_number":109,"context_line":"            raise Exception(\u0027reason\u0027)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        with self.assertRaises(Exception):"},{"line_number":112,"context_line":"            tpool.execute(fail)"}],"source_content_type":"text/x-python","patch_set":2,"id":"abac09e4_773ab285","line":111,"range":{"start_line":111,"start_character":31,"end_line":111,"end_character":40},"updated":"2026-03-13 01:51:32.000000000","message":"This becomes a **lot** stronger if we raise some custom exception defined just for this test. As it is, this still passes with\n```\ndiff --git a/test/unit/common/test_threadpool.py b/test/unit/common/test_threadpool.py\nindex 36b180643..c157b36c3 100644\n--- a/test/unit/common/test_threadpool.py\n+++ b/test/unit/common/test_threadpool.py\n@@ -106,6 +106,7 @@ class TestTpool(unittest.TestCase):\n\n     def test_exception(self):\n         def fail():\n+            asdf\n             raise Exception(\u0027reason\u0027)\n\n         with self.assertRaises(Exception):\n```\napplied.","commit_id":"c644e226f502b50cd07afa73eef037cb5df7b48c"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"7ded645a8c2ff8a1e226bb80d5527e0456eb16e9","unresolved":true,"context_lines":[{"line_number":108,"context_line":"        def fail():"},{"line_number":109,"context_line":"            raise Exception(\u0027reason\u0027)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        with self.assertRaises(Exception):"},{"line_number":112,"context_line":"            tpool.execute(fail)"}],"source_content_type":"text/x-python","patch_set":2,"id":"2777a492_adf11b52","line":111,"range":{"start_line":111,"start_character":31,"end_line":111,"end_character":40},"in_reply_to":"abac09e4_773ab285","updated":"2026-03-13 10:48:20.000000000","message":"Indeed, that makes a lot of sense - will include this in the next patchset as well.","commit_id":"c644e226f502b50cd07afa73eef037cb5df7b48c"}]}
