일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- RFID
- Python
- UK
- Linux
- Software Engineering
- erlang
- Programming
- comic agile
- MySQL
- history
- agile
- Java
- QT
- psychology
- hbase
- ubuntu
- management
- django
- leadership
- Malaysia
- France
- Kuala Lumpur
- programming_book
- Book review
- web
- hadoop
- Book
- Spain
- program
- Italy
- Today
- Total
목록ThreadPoolExecutor (3)
//thread에 timeout 적용 test. timeout이 되는 것이 있고, //timeout이 되지 않고 일단 시작한 thread는 끝까지 실행하는 것이 있음 import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; import j..
//http://bobah.net/d4d/source-code/misc/thread-pool-executor-example-j2ee import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; //import java.util.concurrent.ExecutorService; //import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.Rej..
//http://programmingexamples.wikidot.com/threadpoolexecutor import java.util.concurrent.*; import java.util.*; class TestThreadPoolExecutor { intpoolSize = 2; intmaxPoolSize = 2; longkeepAliveTime = 10; ThreadPoolExecutorthreadPool = null; final ArrayBlockingQueue queue = new ArrayBlockingQueue(5); public TestThreadPoolExecutor() { threadPool = new ThreadPoolExecutor(poolSize, maxPoolSize, keepA..