Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,34 @@ jobs:
matrix:
include:
# Ubuntu
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
- os: ubuntu-latest
python-version: "3.13"
- os: ubuntu-latest
python-version: "3.14"

# Windows
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
- os: windows-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.14"

# macOS (arm64)
- os: macos-14
python-version: "3.10"
- os: macos-14
python-version: "3.11"
- os: macos-14
python-version: "3.12"
- os: macos-14
python-version: "3.13"
- os: macos-14
python-version: "3.14"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/prepare
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.13
3.11
22 changes: 14 additions & 8 deletions hstest/common/process_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,27 @@ def _adjust_thread_count(self) -> None:
if self._idle_semaphore.acquire(timeout=0):
return

# When the executor gets lost, the weakref callback will wake up
# the worker threads.
def weakref_cb(_, q=self._work_queue) -> None:
q.put(None)

num_threads = len(self._threads)
if num_threads < self._max_workers:
thread_name = "%s_%d" % (self._thread_name_prefix or self, num_threads)

args = (
weakref.ref(self, weakref_cb),
self._work_queue,
self._initializer,
self._initargs,
)
# Python 3.14+
if hasattr(self, "_create_worker_context"):
args = (
weakref.ref(self, weakref_cb),
self._create_worker_context(),
self._work_queue,
)
else:
args = (
weakref.ref(self, weakref_cb),
self._work_queue,
self._initializer,
self._initargs,
)

t = threading.Thread(name=thread_name, target=_worker, args=args, group=self.group)
t.daemon = True
Expand Down
Loading
Loading