package com.concurrent.future;

import com.concurrent.util.SleepUtil;

/**
 * User shijingui
 * Date 2017/5/6
 */
public class Test {
    public static void main(String[] args) {
        Client client = new Client();
        //这里会立即返回，因为得到的是一个FutureData而不是RealData
        Data data = client.request("name");
        System.out.println("请求完毕...");
        //
//        SleepUtil.second(2);

        System.out.println("data=" + data.getResult());
    }
}

@@ -355,11 +355,24 @@
   //
-%0A//
+%E4%BD%BF%E7%94%A8sleep%E4%BB%A3%E6%9B%BF%E5%85%B6%E5%AE%83%E4%B8%9A%E5%8A%A1%E6%93%8D%E4%BD%9C%0A
     
@@ -396,12 +396,54 @@
 ond(
-2
+1
 );%0A
+        System.out.println(%22%E5%85%B6%E5%AE%83%E4%B8%9A%E5%8A%A1%E6%89%A7%E8%A1%8C%E5%AE%8C%E6%AF%95...%22);
 %0A   
@@ -495,16 +495,17 @@
 ult());%0A
+%0A
     %7D%0A%7D%0A

update test