RUVIDEO
Поделитесь видео 🙏

How to write a Concurrent Thread-safe Queue from scratch?

Join Replit: https://join.replit.com/arpit-bhayani
Repl: https://replit.com/@arpitbbhayani/ConcurrentQueue
GitHub Repository: https://github.com/arpitbbhayani/concurrency-in-depth

System Design for Beginners: https://arpitbhayani.me/sys-design
System Design for Experienced Engineers: https://arpitbhayani.me/masterclass
Become a member for exclusive in-depth videos: https://www.youtube.com/c/ArpitBhayani/join
Redis Internals: https://arpitbhayani.me/redis

Queues are everywhere; you can find them in message brokers, event-driven systems, thread pools, and to name a few.

A naive queue implementation is not thread-safe at all, which means when multiple threads add or removed from a queue, it may lead to incorrect results and worse runtime exceptions.

In this video, we start with understanding what concurrent queues are and why we need them, then write our own Concurrent Thread-safe Queue in Golang to get a deeper understanding, and then touch upon some real-world applications.

Outline:

00:00 Introduction
01:21 What are concurrent queues?
02:45 Writing Concurrent Thread-safe Queue
06:54 Multi-threaded Enqueue and Dequeue
08:38 Making the queue thread-safe
13:47 Advantages and Limitations of Concurrent Queues
14:53 Real-world applications

# Arpit's System Design Masterclass

I teach a course on System Design where you'll learn how to intuitively design scalable systems. The course will help you

- become a better engineer
- ace your technical discussions
- get you acquainted with a massive spectrum of topics ranging from Storage Engines, High-throughput systems, to super-clever algorithms behind them.

I have compressed my ~10 years of work experience into this course, and aim to accelerate your engineering growth 100x. To date, the course is trusted by 1000+ engineers from 13 different countries.

Together, we will build some of the most amazing systems and dissect them to understand the intricate details. You can find the week-by-week curriculum and topics, benefits, testimonials, and other information here

https://arpitbhayani.me/masterclass.

### Other links

If you have solved an interesting problem and want to talk about it on my channel, check out
https://arpitbhayani.me/podcast

CS Engineering and Software Development books that I have read
https://arpitbhayani.me/bookshelf

Research papers that I have read
https://arpitbhayani.me/papershelf

Newsletter: https://arpit.substack.com
LinkedIn: https://linkedin.com/in/arpitbhayani
Twitter: https://twitter.com/arpit_bhayani
To follow the blogs and papers I am reading, join my telegram channel at https://t.me/asliengineering

You can find handwritten notes and text notes about this video at https://arpitbhayani.me.

Until next time, stay awesome :)

Yours truly,
Arpit
https://arpitbhayani.me
#AsliEngineering

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to write a Concurrent Thread-safe Queue from scratch?», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.