reactor / BlockHound

Java agent to detect blocking calls from non-blocking threads.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detect Synchronized Methods

jonathannaguin opened this issue · comments

Synchronized methods should be detected by BlockHound as blocking operations.

Motivation

A library you import on a Reactor project could make use of Synchronized method that will impact the performance of your project due to the nature of the construct.

Desired solution

BlockHound could detect those synchronized methods and/or synchronized statements and throw an exception when used.

Considered alternatives

Code inspection.

Additional context

Info from the Oracle webpage: https://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html.

I am not sure about the feasibility of this check but thought of raising it here.

Hi @jonathannaguin ,

From my sandbox, I have already conducted a few successful experiments using ASM. Give me some time, and I'll see if I can prepare something.