Is javascript single threaded? - Web Workers API explained

Опубликовано: 29 Сентябрь 2024
на канале: Learn with Sumit - LWS - Bangladesh
10,095
821

In this comprehensive tutorial, we delve into the world of JavaScript's threading model to answer a fundamental question: Is JavaScript truly single-threaded? Can we use JavaScript as a multi threaded programming language? Yes we can, with the Web Worker API concept.

🔗 Timestamps:

0:00 - What is Single Threaded
0:23 - Concurrency
3:00 - Parallelism
3:56 - IO-Intensive work
5:28 - CPU-Intensive work
6:38 - Intro to Web Worker
7:19 - Example project
19:23 - Final words
20:15 - Outro

JavaScript has long been known as a single-threaded language, meaning it processes one task at a time in a synchronous manner. However, the introduction of the Web Workers API changed the game, allowing JavaScript to leverage multi-threading capabilities.

In this video, we explore the Web Workers API, discussing its purpose and how it enables JavaScript to perform concurrent tasks. We'll also provide real-world examples of when and how to use Web Workers to improve the performance of your web applications.

Whether you're a beginner looking to understand JavaScript's threading model or an experienced developer seeking to optimize your web apps, this tutorial has something for everyone.


🔗 Additional Resources:

👍 GitHub Repository: https://github.com/learnwithsumit/web...
👍 Event Loop:    • JavaScript Event Loop & its functions...  

Don't forget to like, subscribe, and hit the notification bell to stay updated with our latest tutorials on web development and JavaScript!

কোন প্রশ্ন থাকলে comment section এ comment করতে পারেন। সেই সাথে আমাদের একটি Facebook Group আছে। সেখানেও আপনার প্রশ্ন করতে পারেন। সব প্রয়োজনীয় link নিচে দেয়া হলো -

👍 Facebook Group -   / learnwithsumit  
👍 Like our Facebook Page -   / letslearnwithsumit  
👍 Follow our GitHub Profile - https://github.com/learnwithsumit
👍 Follow us at Instagram -   / learnwithsumit  
👍 Follow me at -   / sumit.analyzen  
👍 Learn with Sumit Official VS Code Theme - https://lwsbd.link/vst

#learnwithsumit