Skip to content

Commit

Permalink
Each iter-paged call uses its own thread-pool
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicWink committed Apr 11, 2024
1 parent 4d38689 commit 412fb47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/swf_typed/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
v: k for k, v in is_deprecated_by_registration_status.items()
}

executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)


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

executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
response = call()
return iter_()

Expand Down

0 comments on commit 412fb47

Please sign in to comment.