??????????????????????
???????????????????????????????????????? ????????????????ж????????????????У??????????????????????????????????λ???????????????????? ???????????£? ??????????????????????????????У? ???????????????????????????????л???????
???????????????????????????????????????????????????????????????? ??Щ????????????????????????????????????????????????? ??????????????????????? log????????????????????????????????????????????????У? ??????????????????????????????????????????????д?????У???????????????????? ?????????log??????????????????????????????????????????????????????????е??????
?????????Java?????????????????Future ?? FutureTask?? ????λ??java.util.concurrent????. Future?????????FutureTask????????????????????????????????????Future?? ????????????????У? ??????????????????promise??
??????????????ζ????????????????????????? ???????????????????????????????
????import java.util.concurrent.Future;
????public interface IDataManager {
????// synchronous method
????public String getDataSynchronously();
????// asynchronous method
????public Future<String> getDataAsynchronously();
????}
??????????????????????????????????鷳??
?????????????????
?????????????? ???????????н???????????и????????????Java?б?д???????????????????????????????????????????
???????????????????????????????????е????????????????????????????????????á????????????????????????????????????(????????????????????壬?????????????????????).
??????????????????д?????. ????????????task?????. ???????????е????????????е???? ???????????к?????????? ??????????????е??????????????????л??? ???????洢??. ????????????????????????????????? ???????? ??γ?????е????????????????????????????????????????????????????????????????????????????(synchronous and asynchronous exceptions imply synchronous or asynchronous code in your program that might raise exceptions.)??
??????????
????https://msdn.microsoft.com/en-us/magazine/dn818494.aspx
????http://docs.oracle.com/javaee/6/tutorial/doc/gkiez.html
????https://technology.amis.nl/2009/02/19/asynchronous-processing-in-java-applications-leveraging-those-multi-cores/
????http://javarevisited.blogspot.in/2015/01/how-to-use-future-and-futuretask-in-Java.html
????http://www.codeproject.com/Articles/562021/Asynchronous-models-and-patterns
???????
?????????????????????????????????????????????????????????????????????????????????????а????I/O?????????????????????????????????????Java??C#????????????????????????????????????????????????????: ?????????????????ú?????????á?
???????????????????????????? ??????Java?????????????. ??????г??????????????????лл?????
?????????????????
????Java 7??????Fork/Join???? ???????????task??????????????е?Сtask??Java 8??parallelStream???????Fork/Join??в?????????
????Reactive Extensions for .NET???????????????????? Java?ж??????Netflix??RxJava???????????????CQRS??Event Sourcing????
????Akka??????????????????????????????? ???????????????????
????????Spring??reactor??????????????????????????
??????Node.js???????????????? ??????????golang??? goroutines ?? channels.??????????????