Closed qingbozhang closed 1 week ago
Thank you for the PR, @qingbozhang .
We have just eliminated synchronized
blocks ( #3017 ).
Besides, enclosing Runnable#run()
in synchronized
may not achieve anything.
Are you actually experiencing some problem? If so, please provide information for how to reproduce the problem.
Not yet. It just happen in theory.
I see ( https://github.com/mybatis/mybatis-3/pull/3017 ).
I can use lock field replace synchronized
if necessary, and I can close this PR if not
When the
tryImplementation
method is called concurrently, the value oflogConstructor
may be overwritten. So I'm going to use DCL to solve this problem.