본문 바로가기

728x90

threadpoolexecutor

(2)
[Multi-Thread] ThreadPoolExecutor 사용법 및 주의사항 아래 포스팅에서 멀티 쓰레드 환경에서의 작업을 위한 쓰레드 풀을 생성하기 위한 다양한 인터페이스에 대해서 작성하였습니다. https://silver-programmer.tistory.com/entry/Executor-ExecutorService%EC%99%80-ThreadPoolExecutor [Multi-Thread] Executor, ExecutorService와 ThreadPoolExecutor 자바에서는 다중 쓰레드 환경에서 작업을 비동기적으로 실행하기 위한 다양한 인터페이스와 클래스를 제공하고 있습니다. 대표적으로 Executor 인터페이스가 있고, Executor를 확장한 인터페이스인 silver-programmer.tistory.com 여기에서 ThreadPoolExecutor에 대해서도 간..
[Multi-Thread] Executor, ExecutorService와 ThreadPoolExecutor 자바에서는 다중 쓰레드 환경에서 작업을 비동기적으로 실행하기 위한 다양한 인터페이스와 클래스를 제공하고 있습니다. 대표적으로 Executor 인터페이스가 있고, Executor를 확장한 인터페이스인 ExecutorService 인터페이스, 그리고 ExecutorService 인터페이스를 구현한 클래스 중 하나인 ThreadPoolExecutor 가 있습니다. 이번 포스팅은 각각의 인터페이스 및 클래스에 대해서 작성해 보았습니다. Executor 인터페이스 Executor 인터페이스는 java.util.concurrent 패키지에서 제공하는 인터페이스로, 아래와 같이 단일 추상 메서드 'execute(Runnable command)'를 가지고 있습니다. 이 메서드는 Runnable 객체를 매개변수로 받아서..

728x90
반응형