Make parallelism options more well defined.

This commit is contained in:
Mike Auty
2019-03-02 18:52:02 +00:00
parent 9fadee1a17
commit 33a9db6b9f
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ class FileLayer(interfaces.layers.DataLayerInterface):
self._file_ = None # type: Optional[IO[Any]]
self._size = None # type: Optional[int]
# Construct the lock now (shared if made before threading) in case we ever need it
if constants.PARALLELISM == 'threading':
if constants.PARALLELISM == constants.PARALLELISM_THREADING:
self._lock = threading.Lock()
else:
# We don't need a lock for multiprocessing because child threads can't inherit file descriptors by default