Skip to content

Commit 034e795

Browse files
committed
Each iter-paged call uses its own thread-pool
1 parent 4d38689 commit 034e795

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/swf_typed/_common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
v: k for k, v in is_deprecated_by_registration_status.items()
2020
}
2121

22-
executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
23-
2422

2523
class _Sentinel:
2624
"""Not-provided value sentinel."""
@@ -123,6 +121,7 @@ def iter_() -> t.Generator[T, None, None]:
123121
response = future.result()
124122
yield from (model(d) for d in response.get(data_key) or [])
125123

124+
executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
126125
response = call()
127126
return iter_()
128127

0 commit comments

Comments
 (0)