We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e84dd4 commit 517b7f8Copy full SHA for 517b7f8
Lib/test/test_free_threading/test_generators.py
@@ -0,0 +1,23 @@
1
+import unittest
2
+import concurrent.futures
3
+
4
+from unittest import TestCase
5
6
+from test.support import threading_helper
7
8
+@threading_helper.requires_working_threading()
9
+class TestGen(TestCase):
10
+ def test_generators_basic(self):
11
+ def gen():
12
+ for _ in range(5000):
13
+ yield
14
15
16
+ it = gen()
17
+ with concurrent.futures.ThreadPoolExecutor() as executor:
18
19
+ executor.submit(lambda: next(it))
20
21
22
+if __name__ == "__main__":
23
+ unittest.main()
0 commit comments