Skip to content

Multiple File Read Write and concerns of global variables #4

@valiantljk

Description

@valiantljk

The current design uses a 'global' variable in C layer to avoid the python garbage collection on objects within the same file. This however, reminds us to write a test for multiple file create/read/write, as we don't know if different files are differentiable given the only one global variable, i.e., instance of H5PVol class in file python_vol.py.

Fortunately, the dictionary, obj_list in the python layer seems to manage the python objects well. As every new object has it's parent object id associated when request passed from C to python, e.g.,

def H5VL_python_group_create(self, obj_id, ...)

a new object is created after the above group_create function, the parent object (could be a file, or a group) is identified as obj_id, such association should guarantee that all objects, even from different files, won't be messed up.

Tests are written in test_python_vol_multi_file.c

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions