itsh5py.queue_handler#

Base module to handle the queue of open (in memory) files. The main important settings of how many filse are allowed (max_open_files) and the currently open files are exposed in the main API.

Functions

add_open_file(lazy_dict)

Adds a file (or better a LazyDict reference) to the queue.

cleanup()

This will be run atexit and ensures that no references persist in memory and all hdf files are freed.

close(lazy_dict)

Closes a LazyDict.

is_open(filepath)

Checks if a file is in the queue and thus oenened in memory.

open_filenames()

Show file paths of open files

remove_from_queue(file)

Removes file from the queue and from memory.

itsh5py.queue_handler.add_open_file(lazy_dict)[source]#

Adds a file (or better a LazyDict reference) to the queue.

itsh5py.queue_handler.is_open(filepath)[source]#

Checks if a file is in the queue and thus oenened in memory.

itsh5py.queue_handler.remove_from_queue(file)[source]#

Removes file from the queue and from memory. Only if file exists.

This is more complicated than it should be. The issue is that in the queue the actual LazyHdfDict are stored and comparison of those on remove can fail. So comaprison is done on file name basis and removal via index.

itsh5py.queue_handler.close(lazy_dict)[source]#

Closes a LazyDict. This is a small wrapper to check if close will work.

itsh5py.queue_handler.open_filenames()[source]#

Show file paths of open files

itsh5py.queue_handler.cleanup()[source]#

This will be run atexit and ensures that no references persist in memory and all hdf files are freed.