- add close method to PoolSingleton for backwards compatibility

This commit is contained in:
w.pomp
2026-01-21 15:27:45 +01:00
parent 9fdbf49b5c
commit bb74d6e3b0
3 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
[![pytest](https://github.com/wimpomp/parfor/actions/workflows/pytest.yml/badge.svg)](https://github.com/wimpomp/parfor/actions/workflows/pytest.yml) [![pytest](https://github.com/wimpomp/parfor/actions/workflows/pytest.yml/badge.svg)](https://github.com/wimpomp/parfor/actions/workflows/publish.yml)
# Parfor # Parfor
Used to parallelize for-loops using parfor in Matlab? This package allows you to do the same in python. Used to parallelize for-loops using parfor in Matlab? This package allows you to do the same in python.

View File

@@ -478,6 +478,9 @@ class ParPool:
class PoolSingleton: class PoolSingleton:
cpu_count: int = os.cpu_count() cpu_count: int = os.cpu_count()
def close(self) -> None:
pass
class Worker: class Worker:
nested: bool = False nested: bool = False

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "parfor" name = "parfor"
version = "2026.1.5" version = "2026.2.0"
description = "A package to mimic the use of parfor as done in Matlab." description = "A package to mimic the use of parfor as done in Matlab."
authors = [ authors = [
{ name = "Wim Pomp-Pervova", email = "wimpomp@gmail.com" } { name = "Wim Pomp-Pervova", email = "wimpomp@gmail.com" }