Thanks. So it seems the idiom is just to name the ...
# coroutines
j
Thanks. So it seems the idiom is just to name the method with async on the end and return a future, I'm fine with that just want to conform to what other folks are doing.
CompletableFuture<Unit>
, it's a little awkward but it's not really any more awkward than `CompletableFuure<Void>`or if you use just
CompletableFuture
as a rawtype which is pretty nasty for other reasons (though arguably more readable). It's a shame Java doesn't have something equivalent to Job in the futures space.
a
I use
CompletableFuture<?>
to indicate a job whose actual result type isn’t useful, rather than carrying around a reference to
Void
. so that would work just as well for one returning
Unit