diff --git a/docs/release.rst b/docs/release.rst index 71a6c243..745205e7 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -18,8 +18,9 @@ Release notes * Updated the msgpack dependency (by :user:`Jerome Kelleher `; :issue:`74`, :issue:`75`). -* Allow :class:`Blosc` compressor to run on systems where locks are not present (by - :user:`Marcus Kinsella `; :issue:`#83`). +* Allow :class:`Blosc` compressor to run on systems where locks are not present (by + :user:`Marcus Kinsella `, :issue:`83`; and :user:`Tom White `, + :issue:`93`). * Drop Python 3.4 (by :user:`John Kirkham `; :issue:`89`). @@ -61,7 +62,7 @@ Release notes * Add support for encoding None values in VLen... codecs (:issue:`59`). - + .. _release_0.5.1: 0.5.1 diff --git a/numcodecs/__init__.py b/numcodecs/__init__.py index bd0a5461..ab7ae73d 100644 --- a/numcodecs/__init__.py +++ b/numcodecs/__init__.py @@ -44,7 +44,10 @@ from numcodecs.blosc import Blosc register_codec(Blosc) # initialize blosc - ncores = multiprocessing.cpu_count() + try: + ncores = multiprocessing.cpu_count() + except OSError: + ncores = 1 blosc.init() blosc.set_nthreads(min(8, ncores)) atexit.register(blosc.destroy)