- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
#24 Reader-Writer Problem in Java | Why synchronized/wait/notify is NOT Enough ?
Every Java developer's first instinct for thread safety is synchronized. But what if synchronized is hurting your performance without you even realizing it?
In this video, we tackle the classic Reader-Writer Problem, a real concurrency challenge where multiple threads read shared data while one thread occasionally writes to it.
We start with no synchronization and see the chaos. Then we fix it with synchronized - correct, but secretly inefficient.
By the end, you'll understand WHY both tools fall short, and
exactly what kind of lock we actually need to solve this properly.
⚡ What You'll Learn:
→ What the Reader-Writer problem is and why it matters
→ Why synchronized serializes threads that don't need to wait
→ The difference between exclusive and shared locking
→ What ReentrantReadWriteLock is and why it exists
🗂️ This is Part 1 of the Reader-Writer Lock Problem:
⏱️ Timestamps:
00:00 - Introduction
00:25 - Problem Description
04:00 - Coding the Problem - broken solution
05:50 - Version 1: using synchronized
09:05 - Types of Locking
10:23 - Building the Custom Lock Class
13:31 - Code the Custom Lock Class
17:04 - Writer Starvation
18:57 - Solving Writer Starvation
23:21 - Reader Starvation
24:10 - ReentrantReadWriteLock Introduction
🔔 Subscribe to not miss the next parts!
#Java #Multithreading #JavaConcurrency #ReaderWriterProblem
#synchronized #ReentrantLock #JavaThreads #ConcurrencyInJava #bitsofcode #bitofcodebyanand
Видео #24 Reader-Writer Problem in Java | Why synchronized/wait/notify is NOT Enough ? канала Bits of Code by Anand
In this video, we tackle the classic Reader-Writer Problem, a real concurrency challenge where multiple threads read shared data while one thread occasionally writes to it.
We start with no synchronization and see the chaos. Then we fix it with synchronized - correct, but secretly inefficient.
By the end, you'll understand WHY both tools fall short, and
exactly what kind of lock we actually need to solve this properly.
⚡ What You'll Learn:
→ What the Reader-Writer problem is and why it matters
→ Why synchronized serializes threads that don't need to wait
→ The difference between exclusive and shared locking
→ What ReentrantReadWriteLock is and why it exists
🗂️ This is Part 1 of the Reader-Writer Lock Problem:
⏱️ Timestamps:
00:00 - Introduction
00:25 - Problem Description
04:00 - Coding the Problem - broken solution
05:50 - Version 1: using synchronized
09:05 - Types of Locking
10:23 - Building the Custom Lock Class
13:31 - Code the Custom Lock Class
17:04 - Writer Starvation
18:57 - Solving Writer Starvation
23:21 - Reader Starvation
24:10 - ReentrantReadWriteLock Introduction
🔔 Subscribe to not miss the next parts!
#Java #Multithreading #JavaConcurrency #ReaderWriterProblem
#synchronized #ReentrantLock #JavaThreads #ConcurrencyInJava #bitsofcode #bitofcodebyanand
Видео #24 Reader-Writer Problem in Java | Why synchronized/wait/notify is NOT Enough ? канала Bits of Code by Anand
Комментарии отсутствуют
Информация о видео
2 июня 2026 г. 19:30:08
00:26:02
Другие видео канала




















