close abstract method
Closes the current Worker. CombineWorker is a singleton but under the hood it uses a worker manager instance which can be closed and recreated. It may be useful if you want to cancel all running and awaiting tasks (i. e. on user logout).
If waitForRemainingTasks
flag is set to true
then
worker will be marked as closed but will finish all its tasks.
Otherwise all remaining tasks will complete with CombineWorkerClosedException.
You can call execute or initialize methods without awaiting for this future. In that case new isolates' pool will be created.
Implementation
Future<void> close({bool waitForRemainingTasks = false});