flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bowenli86 <...@git.apache.org>
Subject [GitHub] flink pull request #4639: [FLINK-7524] Remove potentially blocking behaviour...
Date Tue, 05 Sep 2017 00:52:36 GMT
Github user bowenli86 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4639#discussion_r136879648
  
    --- Diff: flink-core/src/main/java/org/apache/flink/util/AbstractCloseableRegistry.java
---
    @@ -61,13 +75,14 @@ public final void registerClosable(C closeable) throws IOException
{
     		}
     
     		synchronized (getSynchronizationLock()) {
    -			if (closed) {
    -				IOUtils.closeQuietly(closeable);
    -				throw new IOException("Cannot register Closeable, registry is already closed. Closing
argument.");
    +			if (!closed) {
    +				doRegister(closeable, closeableToRef);
    +				return;
     			}
    -
    -			doRegister(closeable, closeableToRef);
     		}
    +
    +		IOUtils.closeQuietly(closeable);
    --- End diff --
    
    I see


---

Mime
View raw message