MCPcopy Create free account
hub / github.com/PyTables/PyTables / _worker

Function _worker

tables/tests/test_basics.py:2243–2256  ·  view source on GitHub ↗
(fn, qout=None)

Source from the content-addressed store, hash-verified

2241# The worker function for the subprocess (needs to be here because Windows
2242# has problems pickling nested functions with the multiprocess module :-/)
2243def _worker(fn, qout=None):
2244 fp = tb.open_file(fn)
2245 if common.verbose:
2246 print("About to load: ", fn)
2247 rows = fp.root.table.where("(f0 < 10)")
2248 if common.verbose:
2249 print("Got the iterator, about to iterate")
2250 next(rows)
2251 if common.verbose:
2252 print("Succeeded in one iteration\n")
2253 fp.close()
2254
2255 if qout is not None:
2256 qout.put("Done")
2257
2258
2259# From: Yaroslav Halchenko <debian@onerussian.com>

Callers 1

test_multiprocessMethod · 0.85

Calls 2

whereMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected