nvflare.fuel.f3.streaming.stream_utils module¶
- class CheckedExecutor(max_workers=None, thread_name_prefix='')[source]¶
Bases:
ThreadPoolExecutorThis executor ignores task after shutting down
Initializes a new ThreadPoolExecutor instance.
- Parameters:
max_workers – The maximum number of threads that can be used to execute the given calls.
thread_name_prefix – An optional name prefix to give our threads.
initializer – A callable used to initialize worker threads.
initargs – A tuple of arguments to pass to the initializer.
- shutdown(wait=True)[source]¶
Clean-up the resources associated with the Executor.
It is safe to call this method several times. Otherwise, no other methods can be called after this one.
- Parameters:
wait – If True then shutdown will not return until all running futures have finished executing and the resources used by the executor have been reclaimed.
cancel_futures – If True then shutdown will cancel all pending futures. Futures that are completed or running will not be cancelled.