- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
#6 Mastering Semaphores in Java Multithreading 🔐 | Understand Easily + Homework Challenge! #java
Welcome back to the Multithreading in Java Series!
In this episode, we dive deep into one of the most elegant and powerful synchronization tools in Java: Semaphores.
Timelines:
00:00 - Intro & Agenda
02:46 - Analogy for Semaphores
03:33 - Technical terms used in Semaphores
05:53 - Code Example
09:22 - Semaphore with 0 permits
11:50 - How to check available permits?
13:52 - Are Semaphores Thread Safe?
14:28 - Formal Definition and Properties
15:48 - Homework Problem
16:50 - Hints and Ending Notes
👨🏫 What’s covered in this video:
- What are Semaphores? (Explained with an easy real-life analogy)
- How Semaphores handle concurrency
- Why there are no race conditions when using them correctly
- Formal definition and key properties of a Semaphore
🧠 Homework Challenge at the end:
Try solving the Ping-Pong Print Problem using Semaphores!
Two threads: one prints “Ping”, the other prints “Pong” — and they alternate.
✨ This problem will help reinforce your understanding of Semaphores before we solve it together in the next video.
📚 Catch up on previous topics:
- Threads, Runnable, synchronized
- wait()/notify()
- Java Memory Model (volatile, happens-before)
Real-world multithreading problems like Odd-Even and Print 1–N using N threads
📌 Subscribe and turn on the bell 🔔 so you don’t miss the Ping-Pong solution and future threading challenges!
#Java #Multithreading #Semaphores #JavaConcurrency #Threads #JavaThreads #JavaInterview #BitsOfCode
Видео #6 Mastering Semaphores in Java Multithreading 🔐 | Understand Easily + Homework Challenge! #java канала Bits of Code by Anand
In this episode, we dive deep into one of the most elegant and powerful synchronization tools in Java: Semaphores.
Timelines:
00:00 - Intro & Agenda
02:46 - Analogy for Semaphores
03:33 - Technical terms used in Semaphores
05:53 - Code Example
09:22 - Semaphore with 0 permits
11:50 - How to check available permits?
13:52 - Are Semaphores Thread Safe?
14:28 - Formal Definition and Properties
15:48 - Homework Problem
16:50 - Hints and Ending Notes
👨🏫 What’s covered in this video:
- What are Semaphores? (Explained with an easy real-life analogy)
- How Semaphores handle concurrency
- Why there are no race conditions when using them correctly
- Formal definition and key properties of a Semaphore
🧠 Homework Challenge at the end:
Try solving the Ping-Pong Print Problem using Semaphores!
Two threads: one prints “Ping”, the other prints “Pong” — and they alternate.
✨ This problem will help reinforce your understanding of Semaphores before we solve it together in the next video.
📚 Catch up on previous topics:
- Threads, Runnable, synchronized
- wait()/notify()
- Java Memory Model (volatile, happens-before)
Real-world multithreading problems like Odd-Even and Print 1–N using N threads
📌 Subscribe and turn on the bell 🔔 so you don’t miss the Ping-Pong solution and future threading challenges!
#Java #Multithreading #Semaphores #JavaConcurrency #Threads #JavaThreads #JavaInterview #BitsOfCode
Видео #6 Mastering Semaphores in Java Multithreading 🔐 | Understand Easily + Homework Challenge! #java канала Bits of Code by Anand
Комментарии отсутствуют
Информация о видео
2 июня 2025 г. 8:30:44
00:17:51
Другие видео канала















![Stack vs Heap in Java Multithreading Explained in 60 Seconds! [HINDI] 🔥#java #multithreading](https://i.ytimg.com/vi/Ok4fvpv8__U/default.jpg)








