This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 3849dbf  Schedule event to ensure contination is locked before handler 
is called.
3849dbf is described below

commit 3849dbfa48a6a98700eb2cc32d611f8afc569451
Author: Susan Hinrichs <shinr...@apache.org>
AuthorDate: Fri Sep 28 13:26:02 2018 -0500

    Schedule event to ensure contination is locked before handler is called.
---
 iocore/hostdb/P_RefCountCacheSerializer.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/hostdb/P_RefCountCacheSerializer.h 
b/iocore/hostdb/P_RefCountCacheSerializer.h
index a5be736..c153e7f 100644
--- a/iocore/hostdb/P_RefCountCacheSerializer.h
+++ b/iocore/hostdb/P_RefCountCacheSerializer.h
@@ -117,7 +117,9 @@ template <class C> 
RefCountCacheSerializer<C>::~RefCountCacheSerializer()
 
   // Note that we have to do the unlink before we send the completion event, 
otherwise
   // we could unlink the sync file out from under another serializer.
-  cont->handleEvent(REFCOUNT_CACHE_EVENT_SYNC, nullptr);
+
+  // Schedule off the REFCOUNT event, so the continuation gets properly locked
+  this_ethread()->schedule_imm(cont, REFCOUNT_CACHE_EVENT_SYNC);
 }
 
 template <class C>

Reply via email to