Skip to content

Commit 644658e

Browse files
authored
Check the calling thread of Ethread::schedule_local (#9691)
1 parent d809de5 commit 644658e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

iocore/eventsystem/P_UnixEThread.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ EThread::schedule_local(Event *e)
205205
// The continuation that gets scheduled later is not always the
206206
// client VC, it can be HttpCacheSM etc. so save the flags
207207
e->continuation->control_flags.set_flags(get_cont_flags().get_flags());
208+
209+
// If you need to schedule an event from a different thread, use Ethread::schedule_imm/at/in/every functions
210+
ink_release_assert(this == this_ethread());
211+
208212
EventQueueExternal.enqueue_local(e);
209213
return e;
210214
}

0 commit comments

Comments
 (0)