public static void main(String[] a) throws InterruptedException {
        final TransferQueue<String> transferQueue = new LinkedTransferQueue<String>();

        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.execute(new Runnable() {
            public void run() {
                try {
                    // 此处阻塞，等待take()，poll()的发生。
                    transferQueue.transfer("test"); //如果此处注释掉，会阻塞在下面take的方法调用上
                    System.out.println("子线程完成传递.");
                } catch (Exception e) {}
            }
        });

        // 此处阻塞，等待trankser(当然可以是别的插入元素的方法)的发生
        String test = transferQueue.take();
        System.out.printf("主线程完成获取 %s.\n", test);
        Thread.sleep(1000);
    }