MCPcopy Create free account
hub / github.com/apache/trafficserver / destroy

Method destroy

src/api/InkContInternal.cc:103–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void
104INKContInternal::destroy()
105{
106 if (m_free_magic == INKCONT_INTERN_MAGIC_DEAD) {
107 ink_release_assert(!"Plugin tries to use a continuation which is deleted");
108 }
109 m_deleted = 1;
110 if (m_deletable) {
111 this->free();
112 } else {
113 // TODO: Should this schedule on some other "thread" ?
114 // TODO: we don't care about the return action?
115 if (ink_atomic_increment((int *)&m_event_count, 1) < 0) {
116 ink_assert(!"not reached");
117 }
118 EThread *p = this_ethread();
119
120 // If this_thread() returns null, the EThread object for the current thread has been destroyed (or it never existed).
121 // Presumably this will only happen during destruction of statically-initialized objects at TS shutdown, so no further
122 // action is needed.
123 //
124 if (p) {
125 p->schedule_imm(this);
126 }
127 }
128}
129
130void
131INKContInternal::handle_event_count(int event)

Callers 7

TSMBufferDestroyFunction · 0.45
TSCacheHttpInfoDestroyFunction · 0.45
TSContDestroyFunction · 0.45
TSHostLookupTrampolineFunction · 0.45
TSHttpTxnServerPushFunction · 0.45

Calls 4

freeMethod · 0.95
ink_atomic_incrementFunction · 0.85
this_ethreadFunction · 0.85
schedule_immMethod · 0.45