原文:The difference between scheduleAtFixedRate and scheduleWithFixedDelay in JAVA

Recently, due to the project needs,I haveto usemultithread technology in JAVA. Luckly, a helpful multithread technology was created way back in JDK . ,the ScheduledExecutorService interface. It was d ...

2013-04-25 13:13 1 3753 推薦指數:

查看詳情

線程池中的scheduleAtFixedRate scheduleWithFixedDelay區別

在調度線程池中有這么兩個方法,到底什么區別呢,且看我解釋: scheduleAtFixedRate :這個是按照固定的時間來執行,簡單來說:到點執行scheduleWithFixedDelay:這個呢,是等上一個任務結束后,在等固定的時間,然后執行。簡單來說:執行完上一個任務后再執行 ...

Wed Oct 29 16:58:00 CST 2014 0 2413
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM