MCPcopy Index your code
hub / github.com/PyTables/PyTables / run

Function run

examples/simple_threading.py:44–56  ·  view source on GitHub ↗
(filename, path, inqueue, outqueue)

Source from the content-addressed store, hash-verified

42
43
44def run(filename, path, inqueue, outqueue):
45 try:
46 yslice = inqueue.get()
47 h5file = synchronized_open_file(filename, mode="r")
48 h5array = h5file.get_node(path)
49 data = h5array[yslice, ...]
50 psum = np.sum(data)
51 except Exception as e:
52 outqueue.put(e)
53 else:
54 outqueue.put(psum)
55 finally:
56 synchronized_close_file(h5file)
57
58
59def main():

Callers

nothing calls this directly

Calls 4

synchronized_close_fileFunction · 0.85
synchronized_open_fileFunction · 0.70
getMethod · 0.45
get_nodeMethod · 0.45

Tested by

no test coverage detected