[key and difficult points] [JUC 02] volitale uses common modes, what is under JUC, and concurrent tool classes

[key and difficult points] [JUC 02] volitale uses common modes, what is under JUC, and concurrent tool classes 1, volitale common mode Similar to design patterns, it is more abstract 1. Status flag Modify the boolean variable with volatile to indicate whether an event occurs 2. One time safe publication In the absence of synchronizati ...

Posted on Wed, 15 Sep 2021 21:16:01 -0400 by jmgarde

Basic Usage and Summary of CompletableFuture

CompletableFuture Asynchronous Ordering CompletableFuture provides four static methods to create an asynchronous operation //A Runnable is passed in, which is characterized by no return value public static CompletableFuture<Void> runAsync(Runnable runnable) //A Runnable is passed in, which is characterized by the ability to specify exec ...

Posted on Fri, 03 Sep 2021 12:50:08 -0400 by brattt