2014-12-15 3 views
1

에 제출 된 작업의 실행 시간 초과를 설정하는 방법이 있습니까? ThreadPoolTaskExecutor? 그렇지 않으면 응용 프로그램을 효과적으로 마비시키는 매달린 작업에서 풀이 낭비 될 수 있습니다.Spring ThreadPoolTaskExecutor : 실행 제한 시간

+0

http://stackoverflow.com/questions/4819855/time-limit-on-individual-threads-with-executorservice를 보시고이 게시물에서 언급 한 것과 유사하게 작동합니까? – SMA

+0

또한 확인하십시오 http://stackoverflow.com/questions/2758612/executorservice-that-interrupts-tasks-after-a-timeout – Joram

답변

1

짧은 축 .

그러나 작업 시작/실행을 나타내는 시간 초과가있는 APIexecute(Runnable task, long startTimeout)이 있습니다.

+1

문제는이 메소드의 구현은 다음과 같습니다 : public void execute (Runnable task, long startTimeout) { this.execute (task); } – USer22999299