Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/iocore/eventsystem/P_Freer.h b/iocore/eventsystem/P_Freer.h
- index 837c31e16..f028c7727 100644
- --- a/iocore/eventsystem/P_Freer.h
- +++ b/iocore/eventsystem/P_Freer.h
- @@ -47,11 +47,18 @@ public: // Needed by WinNT compiler (compiler bug)
- DeleterContinuation(C *ap) : Continuation(new_ProxyMutex()), p(ap) { SET_HANDLER(&DeleterContinuation::dieEvent); }
- };
- +// This can be useful for two things (or both):
- +// 1. Make sure to schedule a delete on an ET_TASK thread
- +// 2. Delay the delete (this should be used sparingly)
- template <class C>
- TS_INLINE void
- new_Deleter(C *ap, ink_hrtime t)
- {
- - eventProcessor.schedule_in(new DeleterContinuation<C>(ap), t, ET_TASK);
- + if (t > 0) {
- + eventProcessor.schedule_in(new DeleterContinuation<C>(ap), t, ET_TASK);
- + } else {
- + eventProcessor.schedule_imm(new DeleterContinuation<C>(ap), ET_TASK);
- + }
- }
- template <class C> struct FreeCallContinuation : public Continuation {
- diff --git a/proxy/http/remap/UrlRewrite.h b/proxy/http/remap/UrlRewrite.h
- index ef520d41d..b6bb3c02f 100644
- --- a/proxy/http/remap/UrlRewrite.h
- +++ b/proxy/http/remap/UrlRewrite.h
- @@ -76,10 +76,9 @@ public:
- release()
- {
- if (0 == REF_COUNT_OBJ_REFCOUNT_DEC(this)) {
- - // We chedule this for a little bit later, which also lets us do the cleanp on the ET_TASK threads.
- - // This avoids doing costly things on an ET_NET thread.
- + // Delete this on an ET_TASK thread, which avoids doing potentially slow things on an ET_NET thread.
- Debug("url_rewrite", "Deleting old configuration in 5sec");
- - new_Deleter(this, HRTIME_SECOND * 5);
- + new_Deleter(this, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement