Skip to content

Commit

Permalink
Merge branch 'ts_backend_PR' into ts_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeul authored Apr 15, 2024
2 parents 6733a33 + 528f93f commit 67db827
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bfio/base_classes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import abc
import multiprocessing
import numpy
import ome_types
import threading
Expand Down Expand Up @@ -107,6 +108,15 @@ def __init__(
file_path = Path(file_path)
self._file_path = file_path

self._max_workers = (
max_workers

Check warning on line 112 in src/bfio/base_classes.py

View workflow job for this annotation

GitHub Actions / flake8

F821: undefined name 'max_workers'
if max_workers is not None

Check warning on line 113 in src/bfio/base_classes.py

View workflow job for this annotation

GitHub Actions / flake8

F821: undefined name 'max_workers'
else max([multiprocessing.cpu_count() // 2, 1])
)

# Create an thread lock for the object
self._lock = threading.Lock()

def __setitem__(self, keys: typing.Union[list, tuple], values: numpy.ndarray):
raise NotImplementedError(
"Cannot set values for {} class.".format(self.__class__.__name__)
Expand Down

0 comments on commit 67db827

Please sign in to comment.