Multithreading for Beginners

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 152

  • @sharipovsunnatillo2772
    @sharipovsunnatillo2772 2 місяці тому +10

    This is the perfect video course so far. You won't find such a detailed course for free anywhere else.

    • @shandilyacodes
      @shandilyacodes Місяць тому

      Thanks for watching, I am glad you found it useful. Happy Learning :)

  • @janedawg09
    @janedawg09 5 місяців тому +11

    yes. one of the concepts that I want to learn and understand most. thank you for this

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @ShortBursts-yt
    @ShortBursts-yt День тому

    Had so much fun learning this

  • @2ru2pacFan
    @2ru2pacFan 5 місяців тому +28

    OMG! that's exactly what I needed right now! The timing is insane!

    • @mustafaghoneim5262
      @mustafaghoneim5262 5 місяців тому +1

      saaaaaaaaaaameeeeeeeee, but in python

    • @2ru2pacFan
      @2ru2pacFan 5 місяців тому

      @@mustafaghoneim5262 yes Python or Javascript!

    • @theresourceroom7961
      @theresourceroom7961 5 місяців тому

      same!! i have been working on a OS, but i got stuck on multithreading.'

    • @howardchang7999
      @howardchang7999 5 місяців тому

      same

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :)

  • @voidcry9757
    @voidcry9757 4 місяці тому +7

    This is great. Really needed this before my Java developer interview

    • @shandilyacodes
      @shandilyacodes 4 місяці тому +1

      Glad you found it helpful :) Happy learning and all the best for your interview.

  • @Giogiova71
    @Giogiova71 3 місяці тому +3

    4:37:57 it should be worker two acquired lockB, if it was one, it would be unlocked right after

  • @SteelPROTOX
    @SteelPROTOX 4 місяці тому +6

    thanks ramendu i needed this tutorial

    • @shandilyacodes
      @shandilyacodes 4 місяці тому +1

      Thanks for your comment, I am so glad you found it helpful :)

  • @quangduvu6610
    @quangduvu6610 4 місяці тому +2

    Great material!! Learnt alot ^^ Thank you

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Thanks for your comment and feedback. Glad to know that this helped you. Happy learning.

  • @ranjankumarsingh4601
    @ranjankumarsingh4601 4 місяці тому +1

    Thank You for making this tutorial on Multithreading.

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Glad you liked it, thanks for watching. Happy learning :)

  • @adrianstefan1814
    @adrianstefan1814 4 місяці тому +2

    Congrats for such a great course! As a suggestion, it would was better to present Reentrant lock before BlockingQueue, because from what I've read, they internally make use of that.

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Thanks for your feedback! Hope you find the overall content to be useful :)

  • @shandilyacodes
    @shandilyacodes 5 місяців тому +34

    Thank you FreeCodeCamp for taking this course live! I had so much fun making this course and I hope people would find this helpful :) Playlist version of this video available on my channel 😅 ua-cam.com/play/PLG-dyv583o8yTwh-hlvmmhpbHum2u9DKF.html

    • @kalaiarasanpa
      @kalaiarasanpa 5 місяців тому +1

      me too, waiting for part 2

    • @shandilyacodes
      @shandilyacodes 4 місяці тому +1

      @@kalaiarasanpa I am planning to cover topics such as Completable Future, parallel streams, Java 21 multithreading enhancements and new features and async programming using java. Do you have any other ideas except these, please let me know, I'll include those to the list! Thanks

    • @kalaiarasanpa
      @kalaiarasanpa 4 місяці тому +1

      @@shandilyacodes great bro, but new feature in java of a series is good but it gives less interest to viewers. Why should you make a question and answer shorts about the topic that you upload on UA-cam. That shorts make a wide audience to watch topic you upload. Its just a suggestion, thank you 😉.

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      @@kalaiarasanpa Great suggestion, will keep this in mind. Thank you!

  • @cariyaputta
    @cariyaputta 5 місяців тому +2

    Thanks. Amazing course. Added to my library.

    • @shandilyacodes
      @shandilyacodes 5 місяців тому +1

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @sandisosenzo
    @sandisosenzo 5 місяців тому +3

    Finally, a worthy challenge 💪💪🔥😂. I'll take this in a few weeks ❤

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Haha! Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @sprigs953
    @sprigs953 4 місяці тому +1

    Just the video I needed!

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Glad to know that :) Happy learning!

  • @StefanHanrath
    @StefanHanrath 5 місяців тому +1

    An important concept but also an enormous increase in state space for your program. It becomes exponentially less simple to debug and reason about your programs runtime state when you take imperative / most OO languages into multithreaded code

    • @shandilyacodes
      @shandilyacodes 5 місяців тому +1

      That's right! Multithreading should be used cautiously only when there is a absolute need. But in the cases where it's needed, it's a really useful and powerful and can work wonders to the performance.

    • @StefanHanrath
      @StefanHanrath 5 місяців тому

      with high traffic concurrent code its almost inevitable to refactor towards immutable data structures and message passing,
      at that point why not try out functional programming 😅

  • @wannabeice
    @wannabeice 4 місяці тому +1

    thank a lot for this great course!

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Glad you liked it, thanks for watching. Happy learning :)

  • @tarose71
    @tarose71 5 місяців тому +3

    It seems to me the intention behind the naming of the join() method, is that a thread is asking to join its immediate parent that called it, in terms of process execution, and this is also likely related to the Set Theory & databases concept of a logical 'join' operation ... so for me, it is intuitive if you think about it in those contexts, which are useful so long as you understand this historical & related field referencing going on, because it means we can also quickly think to look up those concepts in related fields where the name of the function is telling us that this could be useful ... whereas, the naming you suggested, while more literal, is more cumbersome to type, and doesnt connect us to this other relevant information

    • @blackbeard3449
      @blackbeard3449 5 місяців тому

      The join terminology comes from the fork-join model for multi threading. Basically a thread can be forked into multiple threads which can later join back to the original thread. Wikipedia has an article on it.

    • @tarose71
      @tarose71 5 місяців тому +1

      @@blackbeard3449 which in turn comes from the things I said ... I was talking about the origin of the term from a far broader perspective which does relate to what you said, but also relates to many other concepts ... I wouldn't rely on Wikipedia, a lot of it's written by a younger generation more often than not who have NFI what came beforehand ... Wikipedia is only really useful for individual statistics like the land surface area of a continent or something of that nature which they'd struggle to get wrong, for everything else it's a bit shite

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Thanks for sharing your perspective on the concept @tarose71. I do agree with you, it makes sense when thought in that particular context. What I meant was that the term doesn't sound very intuitive to me if I am starting newly with the multithreading. For example, when I see run() method I know for sure the or atleast have this mental assumption that this particular block would be executed in some way by some one, even before having learnt the concept about run() method in context of multithreading. Thanks for watching! :)

  • @aruns3907
    @aruns3907 4 місяці тому +1

    This is very stupendous

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Thank you! Glad you are loving it. Consider subscribing my channel as well to support my content :)

  • @dr.shreekantsingh3280
    @dr.shreekantsingh3280 4 місяці тому +1

    Excellent! Marvelous!!👍👍👍👍

  • @avi7474
    @avi7474 4 місяці тому +1

    thanks for the content! Would love to learn about your journey into uber and more, as an aspiring swe myself.

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Thanks for you comment, I am glad you found it helpful :) I am planning to shoot one such video and upload on my channel in some weeks :)

  • @mAth4u657
    @mAth4u657 5 місяців тому +1

    Wow ,what a time to have this ❤❤

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @i8you
    @i8you 5 місяців тому +1

    Amazing.. gonna watch today ❤

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @mhasnain5805
    @mhasnain5805 5 місяців тому +1

    Thanks for this much needed video ❤

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @aruns3907
    @aruns3907 4 місяці тому +1

    I hope after the completion i will be able to solve the threading concepts well

    • @shandilyacodes
      @shandilyacodes 4 місяці тому +1

      Thanks for watching. I am positive you'd be able to write and understand 70% of Java multithreaded code. Rest of the advanced concepts I am planning to cover in a second part on this topic :) Happy Learning!

  • @RoshiniAjoy
    @RoshiniAjoy 2 місяці тому +1

    Thank you

  • @babu_g19
    @babu_g19 5 місяців тому +1

    Thanks for the content🎉

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @nithinkrishna8464
    @nithinkrishna8464 5 місяців тому +1

    Thank you soo much🤍

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @rahulyadu1326
    @rahulyadu1326 5 місяців тому +2

    is multithreading achieved by concurency or by parrallel execution in java . can we contorl whether multithreading is achieved by concurrency or parralellism in java

    • @shandilyacodes
      @shandilyacodes 5 місяців тому +2

      I couldn't understand the question fully but I'd try to answer on the basis of what I understood
      In Java multithreading can achieve both the concurrency and parallelism. For the case of Concurrency, Multiple threads share the same CPU core, making progress by switching between threads. Useful in case of for I/O-bound tasks. For the case of Parallelism, Multiple threads running simultaneously on multiple CPU cores, effective for CPU-bound tasks. Thanks for watching! Happy learning.

    • @rahulyadu1326
      @rahulyadu1326 5 місяців тому

      ​@@shandilyacodes i got it. thanks ❤

  • @anonymous5946
    @anonymous5946 5 місяців тому

    Searching for multi threading Playlist and you drop this

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad you found it at the right time, happy learning :)

  • @DDPP-lm3sx
    @DDPP-lm3sx 4 місяці тому +1

    Thanks for this course, any addition for Java 8+ concurrency changes like CompletableFutures etc?

    • @shandilyacodes
      @shandilyacodes 4 місяці тому

      Glad you found it helpful :) Yes, I plan on covering concurrency feature additions in later part of the Java versions in an another video in upcoming months.

    • @amritkanoi8804
      @amritkanoi8804 2 місяці тому

      ​@@shandilyacodeswhen will you release this video with new update

  • @pankajbhanwala-
    @pankajbhanwala- 5 місяців тому +1

    Day 1 33:36

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad you are continuing to go through the course, hope you'll find it worth by the end :) Happy learning!

  • @tabita333
    @tabita333 5 місяців тому

    Im waiting for more courses with JavaScript 😊

  • @babu_g19
    @babu_g19 5 місяців тому +2

    Yes we should have other naming convention for thread join() .

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Yeah, it's not very intuitive imho. Thanks for watching!

  • @saifullahhabid1133
    @saifullahhabid1133 5 місяців тому +1

    I'm about to write my exams thank you so much

  • @MTB_Bay_Area
    @MTB_Bay_Area 4 місяці тому +2

    What IDE does he use here? I usually use IntelliJ. I like how clean his IDE is

    • @shandilyacodes
      @shandilyacodes 3 місяці тому +1

      Hey! Glad you found my IDE setup cool. I am also using IntelliJ with couple of customisations ;) Can make a video if you want! 😅

    • @Rainy_tech
      @Rainy_tech 3 місяці тому

      @@shandilyacodes Please do make a video on it. Also someone who is beginner, try to brief him about IntelliJ and how to use it for java. Please buddy.

    • @shandilyacodes
      @shandilyacodes 3 місяці тому +1

      @@Rainy_tech Great suggestion, will surely consider making a tutorial on this topic on my channel :)

  • @nithinmakam
    @nithinmakam 5 місяців тому +2

    If the video is 30 sec more time, then total time will 5:55:55

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Haha! Yikes, I missed it. Thanks for watching.

  • @akashmandal5253
    @akashmandal5253 3 місяці тому

    at @44:32 which shortcut do you clicked

    • @shandilyacodes
      @shandilyacodes 3 місяці тому

      I have a keyboard shortcut created for this thing called as "Distraction Free Mode" in IntelliJ

    • @akashmandal5253
      @akashmandal5253 3 місяці тому +1

      @@shandilyacodes Thank you

  • @hammadyasir2174
    @hammadyasir2174 5 місяців тому +2

    Please Make this same content for using python programming language....

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      I'll add to my todo list! Thanks

    • @hammadyasir2174
      @hammadyasir2174 5 місяців тому

      @@shandilyacodes when new course with python will be uploaded?

  • @Crazy_Stories.C0M
    @Crazy_Stories.C0M 5 місяців тому +3

    I think you should give a flutter certification like other free code camp certification so that we can prove that we are flutter developer
    I will be very thakful to you :-)
    Please reply
    I will comment until you anser me :-D
    And thanks alot to help us:-)

  • @redissimplified60
    @redissimplified60 4 місяці тому +2

    ExecutorService executor = Executors.newSingleThreadExecutor(); -> I am using jetbrains jbr 17. when I compiled, it shows error like Autoclosable is not implemented in above. In this case, how come it shutdowns automatically. It didn't work. so I terminated with manual shutdown by writing executor.shutdown. can u help me in this?. which java version u have used during recording ?

    • @shandilyacodes
      @shandilyacodes 4 місяці тому +1

      Hey! Glad to know that you are writing code along to learn, great step :) To answer your question, I am on Java 17. However, this should work for anything which is Java8+. Still if it's not working please check the settings in Intelli J. Below are the steps
      1. Go to File > Project Structure
      2. Check the Language level and ensure it's more than Java 8
      Apply, save and re try! Still if it doesn't resolve the issue then File -> Invalidate Cache and restart.
      Let me know how it goes. Thanks!

    • @cortisol_induced_coma
      @cortisol_induced_coma 15 днів тому

      @@shandilyacodes Hello sir, I tried these methods and it still didn't work. I'm using openjdk 22 and set my language level to 22 as well. I tried other versions as well, but it didn't work.

  • @quantum_parody
    @quantum_parody 5 місяців тому

    right on time

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad you found it useful, happy learning :)

  • @wisdomackah5765
    @wisdomackah5765 5 місяців тому

    Please sir Do video about Discrete math

  • @Kneetbomb
    @Kneetbomb 5 місяців тому +57

    Hopefully there's a multithreading and multiprocessing course for python

    • @galip48
      @galip48 5 місяців тому

      Java that cass

    • @akash-kumar737
      @akash-kumar737 5 місяців тому +5

      Yeah will love to see python course. Still it's worth the watch.

    • @prathamjain2762
      @prathamjain2762 5 місяців тому +1

      Eagerly waiting for the python one..

    • @LalitPathak07
      @LalitPathak07 5 місяців тому

      Me as well

    • @pramodjingade6581
      @pramodjingade6581 4 місяці тому +2

      Same here, +1 for Python

  • @roverrace7147
    @roverrace7147 5 місяців тому +1

    Woooooow

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @akashmandal5253
    @akashmandal5253 3 місяці тому +1

    sir some notes are missing like executor service

    • @shandilyacodes
      @shandilyacodes 3 місяці тому

      Hi, I haven't made any notes as such. Was just having some points to explain the theoretical concepts. I might have missed uploading those text in the code repo, will find if it's there, I'll share. Thanks!

  • @rismanrj3259
    @rismanrj3259 5 місяців тому +1

    completed 45:30

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @ArchibaldQuanlockHuntsman
    @ArchibaldQuanlockHuntsman 5 місяців тому

    excellent tutorial as usual but isn't intel phasing out multithreading with lunar lake😢

    • @Baxon
      @Baxon 5 місяців тому +4

      You are thinking of a hyperthreading, which is a feature on intel cpus, it is not the same as multihreading which is a software concept, Multithreading does not require cpus with hyperthreading.

  • @Nathan-ng1kp
    @Nathan-ng1kp 5 місяців тому

    I see you upgraded your workshop to a green screen :)

  • @HarshKumar-rk4zm
    @HarshKumar-rk4zm 5 місяців тому +3

    I think by while naming join method they are thinking like this :
    public class JoinThreadExample {
    public static void main(String[] args) throws InterruptedException {
    Thread one = new Thread(() -> {
    for(int i = 0; i < 15; ++i)
    System.out.println("Thread 1 : " + i);
    Thread innerThreadOne = new Thread(() -> {
    for(int i = 0; i < 20; ++i) System.out.println("Thread 1 inner : " + i);
    });
    innerThreadOne.start();
    try {
    innerThreadOne.join();
    } catch (InterruptedException e) {
    throw new RuntimeException(e);
    }
    });
    Thread two = new Thread(() -> {
    for(int i = 0; i < 25; ++i) {
    System.out.println("Thread 2 : " + i);
    }
    });
    one.start();
    one.join();
    System.out.println("Done execution of both threads!");
    }
    }
    thread main : ---------------->
    one.join()
    thread one : --------------->
    innerThreadOne.join()
    thread innerThreadOne : ----------->
    thread main ----------> finish
    (Kind of joining two threads)

    • @shandilyacodes
      @shandilyacodes 5 місяців тому +1

      This indeed is a correct way of interpreting the join concept. What I meant to say in the video is that it's not very intuitive, specially to someone who could be reading this concept for the very first time, without much context. Thanks for watching.

  • @maximus3159
    @maximus3159 5 місяців тому +1

    I dont even know Java, disappointed it's not C/C++...but leave a like all the same

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      I understand your sentiment. Even if you are not familar with Java, the concepts atleast are transferrable to other languages which implement multithreading in some way or other. I am sure watching the video will have some value if you wish to learn multithreading or revisit the concepts. Thanks!

    • @CoreDump451
      @CoreDump451 18 днів тому

      C multithreading is much more involved. I recommend finding a book about the topic, especially if you plan to learn PThreads.

  • @ivyndane10
    @ivyndane10 4 місяці тому

    Hello please can I get the link of freecodecamp update course link t html css thank you

  • @StephanSingh2495
    @StephanSingh2495 5 місяців тому

    Can someone suggest a good backend, resume level (1 year experienced candidate) project, where the knowledge of multithreading can be utilized to a good extent?

    • @xsdash
      @xsdash 5 місяців тому

      ask chatGPT

  • @yuzuru08
    @yuzuru08 5 місяців тому

    4th video, asking for some projects using IDX

  • @MitosdeArkovia
    @MitosdeArkovia 5 місяців тому

    OMGGGGGGGGGG cuando estara en españollllllllllllllllllllllllllllllllllllllll

  • @moments00000
    @moments00000 3 місяці тому

    Some people hacking is just funny. What do u think about it?

  • @clintonndlovu687
    @clintonndlovu687 6 днів тому

    can i get a certificate?

  • @BROOKnim
    @BROOKnim 3 місяці тому +3

    I just wasted a interview cus i had no idea and hands on about multithreading and concurrency handling.
    Imma binge this video this weekend😃

    • @shandilyacodes
      @shandilyacodes 3 місяці тому +1

      Happy learning :) Drop your questions or queries if any ! Thanks for watching.

  • @Invisible_0011
    @Invisible_0011 5 місяців тому

    Keyboard typing sound is very irritating 😢

  • @__________________________6910
    @__________________________6910 5 місяців тому

    Why not Python 😭

  • @yogeshmishra2858
    @yogeshmishra2858 5 місяців тому +1

    First

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @galip48
    @galip48 5 місяців тому

    4.00

  • @akhilboyini5920
    @akhilboyini5920 5 місяців тому +1

    Second

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @ankitbhimani2100
    @ankitbhimani2100 2 місяці тому

    So much noise is coming because of the keyboard key press.

  • @character640p
    @character640p 5 місяців тому +2

    Why do almost every programming tutorials have bad font sizes? Do they still not know Ctrl + plus (zoom in/ increase font size) feature exists??

    • @yobroc6616
      @yobroc6616 5 місяців тому +3

      It’s free. Why are you being ungrateful?

    • @theresourceroom7961
      @theresourceroom7961 5 місяців тому

      dude, chill this is free. and probably better then most paid classes

    • @character640p
      @character640p 5 місяців тому

      @@yobroc6616 I already told the reason. Why are being ignorant?

    • @shandilyacodes
      @shandilyacodes 5 місяців тому +3

      Thanks for the feedback, I'll surely keep this in mind for my next videos. :)

  • @jackhandyy
    @jackhandyy 5 місяців тому +2

    I can't listen to punj-glish. Wonder if some one can re audio this....

    • @manishshaw1002
      @manishshaw1002 5 місяців тому +7

      thanks no one did it in half-eatend uk or us accent.... I don't know why most of Uk guys eats last char from their word ..... Anyway the knowledge is good if we ignore accent

    • @CoreDump451
      @CoreDump451 13 днів тому

      Wow, imagine feeling this entitled

  • @plumheadedparrotlife.7689
    @plumheadedparrotlife.7689 5 місяців тому +1

    First

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.

  • @nasseribrahim1124
    @nasseribrahim1124 5 місяців тому +1

    First

    • @shandilyacodes
      @shandilyacodes 5 місяців тому

      Glad to share the knowledge, thanks for watching! :) Happy learning.