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.
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 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
@@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 😉.
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
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.
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 😅
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
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.
@@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
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! :)
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!
is multithreading achieved by concurency or by parrallel execution in java . can we contorl whether multithreading is achieved by concurrency or parralellism in java
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.
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.
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:-)
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 ?
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!
@@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.
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!
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.
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)
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.
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!
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?
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
This is the perfect video course so far. You won't find such a detailed course for free anywhere else.
Thanks for watching, I am glad you found it useful. Happy Learning :)
yes. one of the concepts that I want to learn and understand most. thank you for this
Glad to share the knowledge, thanks for watching! :) Happy learning.
Had so much fun learning this
OMG! that's exactly what I needed right now! The timing is insane!
saaaaaaaaaaameeeeeeeee, but in python
@@mustafaghoneim5262 yes Python or Javascript!
same!! i have been working on a OS, but i got stuck on multithreading.'
same
Glad to share the knowledge, thanks for watching! :)
This is great. Really needed this before my Java developer interview
Glad you found it helpful :) Happy learning and all the best for your interview.
4:37:57 it should be worker two acquired lockB, if it was one, it would be unlocked right after
thanks ramendu i needed this tutorial
Thanks for your comment, I am so glad you found it helpful :)
Great material!! Learnt alot ^^ Thank you
Thanks for your comment and feedback. Glad to know that this helped you. Happy learning.
Thank You for making this tutorial on Multithreading.
Glad you liked it, thanks for watching. Happy learning :)
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.
Thanks for your feedback! Hope you find the overall content to be useful :)
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
me too, waiting for part 2
@@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
@@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 😉.
@@kalaiarasanpa Great suggestion, will keep this in mind. Thank you!
Thanks. Amazing course. Added to my library.
Glad to share the knowledge, thanks for watching! :) Happy learning.
Finally, a worthy challenge 💪💪🔥😂. I'll take this in a few weeks ❤
Haha! Glad to share the knowledge, thanks for watching! :) Happy learning.
Just the video I needed!
Glad to know that :) Happy learning!
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
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.
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 😅
thank a lot for this great course!
Glad you liked it, thanks for watching. Happy learning :)
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
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.
@@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
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! :)
This is very stupendous
Thank you! Glad you are loving it. Consider subscribing my channel as well to support my content :)
Excellent! Marvelous!!👍👍👍👍
Thank you! Glad you liked it.
thanks for the content! Would love to learn about your journey into uber and more, as an aspiring swe myself.
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 :)
Wow ,what a time to have this ❤❤
Glad to share the knowledge, thanks for watching! :) Happy learning.
Amazing.. gonna watch today ❤
Glad to share the knowledge, thanks for watching! :) Happy learning.
Thanks for this much needed video ❤
Glad to share the knowledge, thanks for watching! :) Happy learning.
I hope after the completion i will be able to solve the threading concepts well
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!
Thank you
Glad you found this helpful :)
Thanks for the content🎉
Glad to share the knowledge, thanks for watching! :) Happy learning.
Thank you soo much🤍
Glad to share the knowledge, thanks for watching! :) Happy learning.
is multithreading achieved by concurency or by parrallel execution in java . can we contorl whether multithreading is achieved by concurrency or parralellism in java
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.
@@shandilyacodes i got it. thanks ❤
Searching for multi threading Playlist and you drop this
Glad you found it at the right time, happy learning :)
Thanks for this course, any addition for Java 8+ concurrency changes like CompletableFutures etc?
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.
@@shandilyacodeswhen will you release this video with new update
Day 1 33:36
Glad you are continuing to go through the course, hope you'll find it worth by the end :) Happy learning!
Im waiting for more courses with JavaScript 😊
Yes we should have other naming convention for thread join() .
Yeah, it's not very intuitive imho. Thanks for watching!
I'm about to write my exams thank you so much
All the best for your exams and happy learning
Thank you and so to you
What IDE does he use here? I usually use IntelliJ. I like how clean his IDE is
Hey! Glad you found my IDE setup cool. I am also using IntelliJ with couple of customisations ;) Can make a video if you want! 😅
@@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.
@@Rainy_tech Great suggestion, will surely consider making a tutorial on this topic on my channel :)
If the video is 30 sec more time, then total time will 5:55:55
Haha! Yikes, I missed it. Thanks for watching.
at @44:32 which shortcut do you clicked
I have a keyboard shortcut created for this thing called as "Distraction Free Mode" in IntelliJ
@@shandilyacodes Thank you
Please Make this same content for using python programming language....
I'll add to my todo list! Thanks
@@shandilyacodes when new course with python will be uploaded?
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:-)
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 ?
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!
@@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.
right on time
Glad you found it useful, happy learning :)
Please sir Do video about Discrete math
Hopefully there's a multithreading and multiprocessing course for python
Java that cass
Yeah will love to see python course. Still it's worth the watch.
Eagerly waiting for the python one..
Me as well
Same here, +1 for Python
Woooooow
Glad to share the knowledge, thanks for watching! :) Happy learning.
sir some notes are missing like executor service
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!
completed 45:30
Glad to share the knowledge, thanks for watching! :) Happy learning.
excellent tutorial as usual but isn't intel phasing out multithreading with lunar lake😢
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.
I see you upgraded your workshop to a green screen :)
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)
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.
I dont even know Java, disappointed it's not C/C++...but leave a like all the same
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!
C multithreading is much more involved. I recommend finding a book about the topic, especially if you plan to learn PThreads.
Hello please can I get the link of freecodecamp update course link t html css thank you
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?
ask chatGPT
4th video, asking for some projects using IDX
OMGGGGGGGGGG cuando estara en españollllllllllllllllllllllllllllllllllllllll
Some people hacking is just funny. What do u think about it?
can i get a certificate?
I just wasted a interview cus i had no idea and hands on about multithreading and concurrency handling.
Imma binge this video this weekend😃
Happy learning :) Drop your questions or queries if any ! Thanks for watching.
Keyboard typing sound is very irritating 😢
Why not Python 😭
First
Glad to share the knowledge, thanks for watching! :) Happy learning.
4.00
Second
Glad to share the knowledge, thanks for watching! :) Happy learning.
So much noise is coming because of the keyboard key press.
Why do almost every programming tutorials have bad font sizes? Do they still not know Ctrl + plus (zoom in/ increase font size) feature exists??
It’s free. Why are you being ungrateful?
dude, chill this is free. and probably better then most paid classes
@@yobroc6616 I already told the reason. Why are being ignorant?
Thanks for the feedback, I'll surely keep this in mind for my next videos. :)
I can't listen to punj-glish. Wonder if some one can re audio this....
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
Wow, imagine feeling this entitled
First
Glad to share the knowledge, thanks for watching! :) Happy learning.
First
Glad to share the knowledge, thanks for watching! :) Happy learning.