Add volatile on destroyed filed ensure visibility (#13061)

Co-authored-by: ningle <xxuziheng@163.com>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
This commit is contained in:
xuziheng 2023-09-20 09:45:28 +08:00 committed by GitHub
parent f2dbc84cac
commit edaaa16121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ public abstract class AbstractInvoker<T> implements Invoker<T> {
/**
* {@link Node} destroy
*/
private boolean destroyed = false;
private volatile boolean destroyed = false;
/**
* Whether set future to Thread Local when invocation mode is sync