Recently, I had to program some applications that require a large number of scheduled tasks. However, I am afraid to create so many timers because I could not understand how they are handled by Java. Is there a problem with starting a large number of scheduled tasks? If so, which alternative is better?
If you mean one timer and many tasks, Javadocs for Timersays:
Timer
: ( ). , O (log n), n - .
, , . , java.util.concurrent.ScheduledThreadPoolExecutor.
java.util.concurrent.ScheduledThreadPoolExecutor
, . :
:
Source: https://habr.com/ru/post/1712579/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1712574/using-css-to-grab-all-available-vertical-space&usg=ALkJrhiyeYfIsFRMepSmE0scsMOBLr2eZQWhere should I store email templates for emails sent at the end of the batch launch? - c #writing problem in python - pythonCrawler MP3 Link - web-crawlerApache.htaccess hotlinking redirect - redirect(using union) I get neither contained in the aggregate function, nor with an error GROUP BY - sqlCreating a Windows installer for a Visual Studio project - installerHow to inherit if TForm child class? - delphiUnit testing and stored procedures - unit-testingActionScript: Multiple public functions in a single .as file? - actionscriptAll Articles