# shutdownAsync

fun shutdownAsync(): [CompletableFuture](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/CompletableFuture.html)&lt;[Void](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html)?&gt;

[shutdown](/developers/references/android/id-frak-sdk/frak/shutdown/) for Java. Runs on its own scope, not the client's, which `shutdown()` cancels. Blocking it from the main thread throws rather than deadlocking; sequence a following [initialize](/developers/references/android/id-frak-sdk/frak/initialize/) off the future (`thenRun`) rather than beside it, or the new client races the old one's teardown.