In our previous video ( • Synchronized method – Boy Friend Thre... ), we learnt that when a method is synchronized, only one thread can enter the method at a time. But do you know what happens if more than one thread tries to invoke the same synchronized method on different objects simultaneously? In this video, we'll go deeper into this topic and explore the answer to it.
If you liked this video, you'll love our Java Performance Masterclass. Learn more:
https://ycrash.io/java-performance-tr...
- - - - - - - - - - - - - - -
Topics covered:
00:33 - Multiple synchronized methods in a same object example
02:45 - How does the same Synchronized method on different objects work in Java?
04:54 - Threads behavior when executing same Synchronized on different objects
- - - - - - - - - - - - - - -
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...
Can threads execute the same synchronized method on same objects?
https://blog.ycrash.io/2023/02/13/can...
- - - - - - - - - - - - - - -
Read more in this blog:
https://blog.ycrash.io/2023/02/13/can...
- - - - - - - - - - - - - - -
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 same object?
• Can threads execute different synchro...
- - - - - - - - - - - - - - -
#synchronized | #synchronizedmethod | #synchronizedmethodinjava | #javasynchronizedmethod | #thread | #threads | #c# | #threadexecutemethod | #threadsynchronization | #synchronizedmethods | #javasynchronized | #synchronizedblock | #synchronizedkeywordinjava | #synchronizedmethodsinjava | #synchronizedblockandsynchronizedmethodsinjava | #synchronizedmethodandsynchronizedblockinjava | #synchronizedblockvssynchronizedmethod | #multithreadingsynchronizedkeyword