Advertisement
Guest User

Untitled

a guest
Mar 16th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LDIF 1.66 KB | None | 0 0
  1. diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h
  2. index 837c31e16..f028c7727 100644
  3. --- a/iocore/eventsystem/P_Freer.h
  4. +++ b/iocore/eventsystem/P_Freer.h
  5. @@ -47,11 +47,18 @@ public: // Needed by WinNT compiler (compiler bug)
  6.    DeleterContinuation(C *ap) : Continuation(new_ProxyMutex()), p(ap) { SET_HANDLER(&DeleterContinuation::dieEvent); }
  7.  };
  8.  
  9. +// This can be useful for two things (or both):
  10. +//    1. Make sure to schedule a delete on an ET_TASK thread
  11. +//    2. Delay the delete (this should be used sparingly)
  12.  template <class C>
  13.  TS_INLINE void
  14.  new_Deleter(C *ap, ink_hrtime t)
  15.  {
  16. -  eventProcessor.schedule_in(new DeleterContinuation<C>(ap), t, ET_TASK);
  17. +  if (t > 0) {
  18. +    eventProcessor.schedule_in(new DeleterContinuation<C>(ap), t, ET_TASK);
  19. +  } else {
  20. +    eventProcessor.schedule_imm(new DeleterContinuation<C>(ap), ET_TASK);
  21. +  }
  22.  }
  23.  
  24.  template <class C> struct FreeCallContinuation : public Continuation {
  25. diff --git a/proxy/http/remap/UrlRewrite.h b/proxy/http/remap/UrlRewrite.h
  26. index ef520d41d..b6bb3c02f 100644
  27. --- a/proxy/http/remap/UrlRewrite.h
  28. +++ b/proxy/http/remap/UrlRewrite.h
  29. @@ -76,10 +76,9 @@ public:
  30.    release()
  31.    {
  32.      if (0 == REF_COUNT_OBJ_REFCOUNT_DEC(this)) {
  33. -      // We chedule this for a little bit later, which also lets us do the cleanp on the ET_TASK threads.
  34. -      // This avoids doing costly things on an ET_NET thread.
  35. +      // Delete this on an ET_TASK thread, which avoids doing potentially slow things on an ET_NET thread.
  36.        Debug("url_rewrite", "Deleting old configuration in 5sec");
  37. -      new_Deleter(this, HRTIME_SECOND * 5);
  38. +      new_Deleter(this, 0);
  39.      }
  40.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement