Demo entry 6359016

aa

   

Submitted by anonymous on Apr 27, 2017 at 11:05
Language: Java. Code size: 137 Bytes.

ExecutorService service = Executors.newFixedThreadPool(2);
Future future = service.submit(() -> {
    // 耗时计算
});
future.get(); // 阻塞

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).