In the earlier video ( • Synchronized method – Boy Friend Thre... ) we learnt about the Java synchronized method. In this video, we'll understand thread synchronization behavior in the Java synchronized blocks, using the same boy friend thread and girl friend object example.
If you liked this video, you'll love our Java Performance Masterclass. Learn more:
https://ycrash.io/java-performance-tr...
- - - - - - - - - - - - - -
Topics covered:
00:23 - Synchronized block demo
02:42 - Difference between synchronized method and synchronized block
05:28 - Threads behavior of a synchronized block
07:20 - Advantages of Synchronized block over Synchronized method
09:05 - Disadvantages of Synchronized Block over Synchronized Method
- - - - - - - - - - - - - -
Links shared in the video:
Synchronized method – Boy Friend Threads & Girl Friend Object:
https://blog.ycrash.io/2023/02/13/syn...
Open-source script yCrash:
https://github.com/ycrash/yc-data-script
Thread dump analysis report:
https://fastthread.io/my-thread-repor...
Java Static Synchronized method behavior:
https://blog.ycrash.io/2023/02/13/jav...
Can threads execute the same synchronized method on different objects?
https://blog.ycrash.io/2023/02/13/can...
- - - - - - - - - - - - - -
Read more in this blog:
https://blog.ycrash.io/2023/02/13/jav...
- - - - - - - - - - - - - -
Our Tools:
yCrash: https://ycrash.io/
GCeasy: https://gceasy.io/
HeapHero: https://heaphero.io/
fastThread Tool: https://fastthread.io/
- - - - - - - - - - - - - -
SRE Community:
Need help in troubleshooting your performance problems?
Post here: https://answers.ycrash.io/
- - - - - - - - - - - - - -
Follow us on:
LinkedIn: / ycrash
Instagram: / ycrash_rca
Facebook: / tier1app
Twitter: / tier1app
- - - - - - - - - - - - - -- - - - - - - - - - - - - - -
Related videos:
Synchronized method – Boy Friend Threads & Girl Friend Object:
• Synchronized method – Boy Friend Thre...
Can threads execute different synchronized methods on the same object?
• Can threads execute different synchro...
- - - - - - - - - - - - - -
#synchronizedbloc | #synchronizedblockinjava | #synchronized | #synchronizedblockvssynchronizedmethod | #synchronizedblockinjavaexample | #synchronizedkeywordinjava | #javasynchronized | #whatissynchronizedblockinjava? | #javasynchronizedblock | #synchronizedmethodinjava | #synchronizedmethod | #javasynchronizedblocks | #synchronizedblockinjava8 | #whyuseasynchronizedblock | #whatissynchronizedblockinjava | #programonsynchronizedblock | #synchronizedinjava