You can mix and match the callback functions to create a nice asyncronous pipeline. Just note that if you call the get()
operation immediately that will BLOCK the execution until the async operation finalizes, which kinda defeats the purpose of the async operation. If you do not want to block, then use the then()
approach, where that callback will be called for you with the result of the async operation and then you can do your post-processing. The alternative is to sit and poll the isDone()
or isCancelled()
operations, and YUCK!