mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-117478: Add @support.requires_gil_enabled
decorator (#117479)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
parent
de5ca0bf71
commit
42205143f8
7 changed files with 23 additions and 11 deletions
|
@ -116,7 +116,7 @@ class ProcessPoolExecutorTest(ExecutorTest):
|
|||
for _ in range(job_count):
|
||||
sem.release()
|
||||
|
||||
@unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
|
||||
@support.requires_gil_enabled("gh-117344: test is flaky without the GIL")
|
||||
def test_idle_process_reuse_one(self):
|
||||
executor = self.executor
|
||||
assert executor._max_workers >= 4
|
||||
|
|
|
@ -41,7 +41,7 @@ class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, BaseTestCase):
|
|||
sem.release()
|
||||
executor.shutdown(wait=True)
|
||||
|
||||
@unittest.skipIf(support.Py_GIL_DISABLED, "gh-117344: test is flaky without the GIL")
|
||||
@support.requires_gil_enabled("gh-117344: test is flaky without the GIL")
|
||||
def test_idle_thread_reuse(self):
|
||||
executor = self.executor_type()
|
||||
executor.submit(mul, 21, 2).result()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue