You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2018/11/09 18:29:00 UTC
[geode] branch develop updated: GEODE-3416 Reduce synchronization
blockages in SocketCreator
This is an automated email from the ASF dual-hosted git repository.
bschuchardt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 3b2ff44 GEODE-3416 Reduce synchronization blockages in SocketCreator
3b2ff44 is described below
commit 3b2ff449f057c20166470c41da07aa274d2ae2ad
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Fri Nov 9 09:16:34 2018 -0800
GEODE-3416 Reduce synchronization blockages in SocketCreator
Fixing LGTM complaint about synch on auto-boxed variable
---
.../src/main/java/org/apache/geode/internal/net/SocketCloser.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCloser.java b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCloser.java
index c4cbde9..53815ec 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCloser.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCloser.java
@@ -68,7 +68,7 @@ public class SocketCloser {
private final int asyncClosePoolMaxThreads;
private final long asyncCloseWaitTime;
private final TimeUnit asyncCloseWaitUnits;
- private Boolean closed = Boolean.FALSE;
+ private boolean closed;
public SocketCloser() {
this(ASYNC_CLOSE_POOL_KEEP_ALIVE_SECONDS, ASYNC_CLOSE_POOL_MAX_THREADS,
@@ -132,7 +132,7 @@ public class SocketCloser {
* called then the asyncClose will be done synchronously.
*/
public void close() {
- synchronized (closed) {
+ synchronized (this) {
if (!this.closed) {
this.closed = true;
} else {
@@ -167,7 +167,7 @@ public class SocketCloser {
boolean doItInline = false;
try {
Future submittedTask = null;
- synchronized (closed) {
+ synchronized (this) {
if (closed) {
// this SocketCloser has been closed so do a synchronous, inline, close
doItInline = true;