MCPcopy Create free account
hub / github.com/ceph/ceph / async_process_batches

Function async_process_batches

qa/workunits/dencoder/test_readable.py:299–304  ·  view source on GitHub ↗
(task_batches)

Source from the content-addressed store, hash-verified

297
298# Create a generator that processes batches asynchronously
299def async_process_batches(task_batches):
300 max_workers = 10
301 with concurrent.futures.ProcessPoolExecutor(max_workers=max_workers) as executor:
302 futures = [executor.submit(process_batch, batch) for batch in task_batches]
303 for future in concurrent.futures.as_completed(futures):
304 yield future.result()
305
306def debug_print(msg):
307 if debug:

Callers 1

mainFunction · 0.85

Calls 2

submitMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected