sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-models-impl] 05/08: SLING-3536 - on each interval for callback disposal, continue to poll until all queue is exhausted.
Date Tue, 07 Nov 2017 09:55:09 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.models.impl-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-impl.git

commit a3ad23db24539b0b8439fdc6a0b20d903fd68d45
Author: Justin Edelson <justin@apache.org>
AuthorDate: Thu May 1 12:48:32 2014 +0000

    SLING-3536 - on each interval for callback disposal, continue to poll until all queue
is exhausted.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl@1591638
13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java b/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
index aed43f2..7a686fc 100644
--- a/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
+++ b/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java
@@ -133,10 +133,11 @@ public class ModelAdapterFactory implements AdapterFactory, Runnable
{
     @Override
     public void run() {
         java.lang.ref.Reference<? extends Object> ref = queue.poll();
-        if (ref != null) {
-            log.debug("calling disposal for " + ref.toString());
+        while (ref != null) {
+            log.debug("calling disposal for {}.", ref.toString());
             DisposalCallbackRegistryImpl registry = disposalCallbacks.remove(ref);
             registry.onDisposed();
+            ref = queue.poll();
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message