Can threads execute different synchronized methods on the same object?

Опубликовано: 08 Май 2026
на канале: yCrash
374
4

In this video, let’s do a little bit of deep dive – What would happen if an object has two synchronized methods? When a thread is executing the first synchronized method, will another thread be allowed to execute the second synchronized method?

If you liked this video, you'll love our Java Performance Masterclass. Learn more:
https://ycrash.io/java-performance-tr...

- - - - - - - - - - - - - -

Topics covered:

00:30 - Multiple synchronized methods in a same object example
04:30 - How do two Synchronized methods work in Java?
05:40 - Threads behavior of Synchronized methods

- - - - - - - - - - - - - -

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 different 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 Threads &...  

- - - - - - - - - - - - - -

#synchronized | #synchronizedmethod | #synchronizedmethodinjava | #javasynchronizedmethod | #thread | #threads | #c# | #threadexecutemethod | #threadsynchronization | #synchronizedmethods | #javasynchronized | #synchronizedblock | #synchronizedkeywordinjava | #synchronizedmethodsinjava | #synchronizedblockandsynchronizedmethodsinjava | #synchronizedmethodandsynchronizedblockinjava | #synchronizedblockvssynchronizedmethod | #multithreadingsynchronizedkeyword