Created
March 26, 2016 11:35
-
-
Save keitaroemotion/96e5074868ffa7e91bca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| import java.lang.Thread; | |
| import java.util.concurrent.TimeUnit; | |
| import lib.Stone; | |
| import java.util.concurrent.ExecutorService; | |
| public class Main{ | |
| public static void main(String args[]) { | |
| multiThreadExample(); | |
| } | |
| private static void displayFileContent(String param){ | |
| new Thread(() -> { Stone.putsLazy(Stone.readFile(param)); }).start(); | |
| } | |
| private static void multiThreadExample() { | |
| Stone.newList("etc/1", "etc/2").forEach( x -> displayFileContent(x)); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment