Last active
January 7, 2018 21:05
-
-
Save pvllnspk/45e9f51150a62b5252656f3e2d806be4 to your computer and use it in GitHub Desktop.
Revisions
-
pvllnspk revised this gist
Jan 7, 2018 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,7 @@ for (int i = 0; i < n; ++i) { } 3. Observable.zip( , ,new BiFunction() { @Override public List<User> apply() throws Exception { } -
pvllnspk revised this gist
Jan 7, 2018 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,13 @@ for (int i = 0; i < n; ++i) { Future<String> result = executorCompletionService.take(); } 3. Observable.zip(, , new BiFunction() { @Override public List<User> apply() throws Exception { } }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(getObserver()); -
pvllnspk revised this gist
Jan 7, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,5 +12,9 @@ List<Future<String>> results = executorService.invokeAll(callables); for(Future<String> future: results){ result+= future.get(); } for (int i = 0; i < n; ++i) { Future<String> result = executorCompletionService.take(); } 3. -
pvllnspk revised this gist
Jan 7, 2018 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,12 @@ } 2. String result = executorService.submit(callable).get(); List<Callable<String>> callables = ... List<Future<String>> results = executorService.invokeAll(callables); for(Future<String> future: results){ result+= future.get(); } 3. -
pvllnspk revised this gist
Jan 7, 2018 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,11 @@ for(int i = 0; i < threads.size(); i++) { threads.get(i).start(); threads.get(i).join(); } 2. List<Callable<String>> callables = ... List<Future<String>> results = executorService.invokeAll(callables); for(Future<String> future: results){ result+= future.get(); } -
pvllnspk created this gist
Jan 7, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ 1. for(int i = 0; i < threads.size(); i++) { threads.get(i).start(); threads.get(i).join(); }