У нас вы можете посмотреть бесплатно #18 ExecutorService Internals Part 4: The 7 Constructor Parameters of ThreadPoolExecutor Explained или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Welcome back to our *Multithreading in Java* series! 🚀 In this deep-dive, we pull back the curtain on the Java ExecutorService and explore its true power source: the ThreadPoolExecutor class constructor. Stop using the simple factory methods like `newFixedThreadPool()` and start mastering custom thread pool creation! 🎯 Timelines: 0:00 – Intro 0:11 – Internals of Executors function 1:27 – Core Pool Size And Max Pool Size 2:18 – KeepAliveTime and Time Unit 2:25 – Values Of Parameters in different thread pools 5:12 – The Work Queue 5:45 – LinkedBlockingQueue 7:31 – SynchronousQueue 8:23 – DelayedWorkQueue and ArrayBlockingQueue 9:16 – Steps involved in executing a task 10:46 – RejectionHandler and Rejection Policies 13:15 - ThreadFactory 14:14 - Fork Join Pool This video explains the 7 critical parameters of the `ThreadPoolExecutor` constructor (and why WorkStealingPool is different): *1. Core Pool Size & Maximum Pool Size:* Learn the difference between your 'permanent staff' threads and the absolute upper limit for scaling. We explain how these two define the "size" of your thread army. *2. KeepAliveTime & TimeUnit:* Understand how to shrink your pool back down and conserve resources during low activity. *3. The Work Queue (BlockingQueue):* This is the heart of the pool's scheduling strategy. We break down the four key queue types and explain why `LinkedBlockingQueue` is used for Fixed Pools and `SynchronousQueue` is used for Cached Pools. *4. Rejected Execution Handler:* What happens when your pool and queue are both full? We cover the 4 standard rejection policies, including the important "Caller-Runs Policy" and the concept of **back pressure**. *5. ThreadFactory:* Why using a custom `ThreadFactory` is crucial for production-level debugging (no more 'Thread-15'!). By the end of this video, you'll understand that `Executors.newFixedThreadPool(10)` is just a shortcut. You’ll have the knowledge to create perfectly tuned, custom thread pools for any high-performance Java application. 🔗 **Watch the previous video in the series: • Multithreading in Java (Problems & Concepts) 👍 Like this video if you learned something new! 🔔 Subscribe for more advanced Java and Multithreading content! 💬 Let me know your favourite rejection policy in the comments below! #Java, #Multithreading, #ExecutorService, #ThreadPoolExecutor, #BlockingQueue, #JavaConcurrency, #WorkQueue, #javainterviewquestions , #javathreads , #ThreadPoolExecutor