Advanced Java: Multi-threading Part 3 -- The Synchronized Keyword

preview_player
Показать описание
-------------------------------------------------------------------------------------------------------------------------------------------
The basics of using the synchronised keyword in Java to stop threads messing up each other's work. What's an intrinsic lock, and why do we need it?
--------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

thanks to guys like you whom we learn from that fills the void left by school intellectually and financially. you guys are the future of education and I am looking forward to it

mrmanualways
Автор

Thank you very much for all the videos you've uploaded. This Java Multi-Threading was driving me insane until i saw your videos. You're a blessing!

ruben
Автор

Thank you Sir, people like you are the hope of Education. You have a Natural gift of teaching

yvonneatieno
Автор

Simple & precise way of explaining concepts

rajtilak
Автор

Man this all playlist you made for java synchronization threds multi-threading ARE AWSOME !!! WELL DONE ... Subscribe ofcourse....

MrNinjaMKD
Автор

9:46 Very useful!! :)
11:15 too

Very nice video. I added some extra info, i printed out the increments and yeah it's basically just two threads doing the shared work with mutex/intrinsic log and then the third thread just waits for them to finish. Sometimes only thread1 does the counting and sometimes thread2 does all the counting and sometimes they both do the counting :) basically same idea as first tutorial videos, just added some additional ways to it. Thanks so much for these videos!

TheiLame
Автор

Thanks a lot, this is the best explanation on synchronized keyword and it explains simply why we need it and what is an object lock, thanks a lot sir.

aamirfayaz
Автор

What a great talent to simplify a complicated subject and make it easy to follow! Good job. I really appreciate your teaching style. I have a similar approach with my videos. Keep it up! :)

VirtualWorlds
Автор

explained very well. my prof could really learn something from this guy.

IMakeMyDayI
Автор

Very nice tutorial on a very important subject! Keep up the good work, it's widely appreciated! :)

Thomashed
Автор

Yes, that's right. If one tries to use it when the other is busy with it, it just waits till it's free.

caveofprogramming
Автор

No, it still does the job. The threads take it in turns to run, each doing a tiny slice of time and then the other, then the first thread again, then the second and so on until they're finished. This is what happens anyway with multiple threads (unless you have multiple CPUs); here we're just synchronizing the threads in such a way that they don't overwrite each other's work as they go along, but they still both run "at the same time".

caveofprogramming
Автор

Thank you for this excellent tutorial, wonderful!!!

gungoryildirim
Автор

these tutorials are amazing! keep up the fantastic work!

Rreptarr
Автор

Very nice tutorials John. Keep up the good work :D.

ForgottenKnight
Автор

very useful :), i understood the Synchronize very well from your video thx

mrhossamsamir
Автор

thank you for this! very simple powerful and useful!! you are a good teacher! :)

Blue-Scorpion
Автор

this is still helpful sir and always will!! thankyou so much :D

som
Автор

Volatile has its uses, but it's much more common to use synchronized. Better still to use thread safe classes from the concurrent package.

caveofprogramming
Автор

That's a really great suggestion .... I've starting using drawing a bit actually. Unfortunately my drawing and handwriting are terrible, but it's better than nothing.

caveofprogramming
join shbcf.ru