dcnum.write.chunk_writer
Classes
Convenience class for writing to data outside the main loop |
Module Contents
- class dcnum.write.chunk_writer.ChunkWriter(path_out: pathlib.Path | dcnum.common.h5py.File, dq: collections.deque, write_queue_size: multiprocessing.sharedctypes.Synchronized, ds_kwds: dict | None = None, mode: str = 'a', parent_logger: logging.Logger | None = None, *args, **kwargs)[source]
Bases:
threading.ThreadConvenience class for writing to data outside the main loop
Data are numpy arrays collected from a dequeue object
- Parameters:
path_out – Path to the output HDF5 file
dq (collections.deque) – collections.deque object from which data are taken using popleft().
write_queue_size – Multiprocessing value to which the size of dq is written periodically
ds_kwds – keyword arguments for dataset creation, passed to
HDF5Writermode – HDF5 file opening mode, passed to
HDF5Writer
- writer
- dq
- may_stop_loop = False
- must_stop_loop = False
- write_queue_size
- run()[source]
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.