nu_coincidence.utils.parallel module
- class nu_coincidence.utils.parallel.FileWritingBackend(**kwargs)
Bases:
ImmediateResultBackend
Assumes result from future has a write() method which is called.
- future_handler(future)
Do something useful with the completed future e.g. write to file.
- class nu_coincidence.utils.parallel.ImmediateResultBackend(**kwargs)
Bases:
LokyBackend
Custom backend for acting on results as they are processed in a joblib Parallel() call.
- apply_async(func, callback=None)
Override this method to Handle your new callback in addition to any existing ones.
- callback(future)
The extra callback passes a future to future_handler, which must be implemented.
- abstract future_handler(future)
Do something useful with the completed future e.g. write to file.
- class nu_coincidence.utils.parallel.MultiCallback(*callbacks)
Bases:
object
Allow for multiple async callbacks in your custom parallel backend.