Open laeubi opened 3 years ago
Thanks @laeubi this is a really good idea. Its a pretty deep change to make this work, but we will be considering how to do so.
@JohnLCaron thanks for consideration. Moving away sync to async processing could really speedup things in some cases.
I'd like to read a ucar.nc2.Variable (a big array) and like to monitor the progress of reading and allow the user to potentially cancel.
A ucar.nc2.util.CancelTask seems the supposed way, but read does not allow to specify one.
As an alternative I can think of to have a method readAsync() that returns a CompletableFuture, that would allow to cancel the future instead and the code can internally create a CancelTask for the future e.g. in the following way: